diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2023-01-15 22:10:36 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-23 04:50:33 -0500 |
commit | fec7c2ea8242773b53b253d9536426f743443944 (patch) | |
tree | 3cfe164e9505b5c7529530d970e18f4026cb807a /compiler/Language | |
parent | a83ec778e44efcd4b56ce81ea0a183e6e73f026b (diff) | |
download | haskell-fec7c2ea8242773b53b253d9536426f743443944.tar.gz |
EPA: Add SourceText to HsOverLabel
To be able to capture string literals with possible escape codes as labels.
Close #22771
Diffstat (limited to 'compiler/Language')
-rw-r--r-- | compiler/Language/Haskell/Syntax/Expr.hs | 5 |
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) |