summaryrefslogtreecommitdiff
path: root/compiler/Language/Haskell/Syntax/Expr.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2023-01-15 22:10:36 +0000
committerAlan Zimmerman <alan.zimm@gmail.com>2023-01-19 18:00:16 +0000
commit07b616e3ddc4952306c03543271e001d1b81836c (patch)
tree97febaaf852adb7081268927395f4d999e9232bf /compiler/Language/Haskell/Syntax/Expr.hs
parent14b5982a3aea351e4b01c5804ebd4d4629ba6bab (diff)
downloadhaskell-wip/az/ppr-overloaded-labels.tar.gz
EPA: Add SourceText to HsOverLabelwip/az/ppr-overloaded-labels
To be able to capture string literals with possible escape codes as labels. Close #22771
Diffstat (limited to 'compiler/Language/Haskell/Syntax/Expr.hs')
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index 5ac3e33bdf..1af91044dd 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -31,7 +31,7 @@ import Language.Haskell.Syntax.Binds
-- others:
import GHC.Types.Fixity (LexicalFixity(Infix), Fixity)
-import GHC.Types.SourceText (StringLiteral)
+import GHC.Types.SourceText (StringLiteral, SourceText)
import GHC.Unit.Module (ModuleName)
import GHC.Data.FastString (FastString)
@@ -271,8 +271,9 @@ data HsExpr p
-- See Note [Non-overloaded record field selectors] and
-- Note [Record selectors in the AST]
- | HsOverLabel (XOverLabel p) FastString
+ | HsOverLabel (XOverLabel p) SourceText FastString
-- ^ Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels)
+ -- Note [Pragma source text] in GHC.Types.SourceText
| HsIPVar (XIPVar p)
HsIPName -- ^ Implicit parameter (not in use after typechecking)