summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Splice.hs-boot
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2022-03-11 16:51:09 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-18 05:10:58 -0400
commit4a2567f5641a4807584c90015dfc40a791f241b4 (patch)
tree632cd30d5a1d5be5536d4f30cadeaa347ce81382 /compiler/GHC/Tc/Gen/Splice.hs-boot
parent310890a51372937afa69e1edac1179eba67ac046 (diff)
downloadhaskell-4a2567f5641a4807584c90015dfc40a791f241b4.tar.gz
TTG: Refactor bracket for desugaring during tc
When desugaring a bracket we want to desugar /renamed/ rather than /typechecked/ code; So in (HsExpr GhcTc) tree, we must have a (HsExpr GhcRn) for the quotation itself. This commit reworks the TTG refactor on typed and untyped brackets by storing the /renamed/ code in the bracket field extension rather than in the constructor extension in `HsQuote` (previously called `HsUntypedBracket`) See Note [The life cycle of a TH quotation] and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4782
Diffstat (limited to 'compiler/GHC/Tc/Gen/Splice.hs-boot')
-rw-r--r--compiler/GHC/Tc/Gen/Splice.hs-boot8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Gen/Splice.hs-boot b/compiler/GHC/Tc/Gen/Splice.hs-boot
index 68efb320a8..c4cd5f70df 100644
--- a/compiler/GHC/Tc/Gen/Splice.hs-boot
+++ b/compiler/GHC/Tc/Gen/Splice.hs-boot
@@ -10,8 +10,8 @@ import GHC.Tc.Utils.TcType ( ExpRhoType )
import GHC.Types.Annotations ( Annotation, CoreAnnTarget )
import GHC.Hs.Extension ( GhcRn, GhcPs, GhcTc )
-import GHC.Hs ( HsSplice, HsTypedBracket, HsUntypedBracket, HsExpr,
- LHsExpr, LHsType, LPat, LHsDecl, ThModFinalizers )
+import GHC.Hs ( HsSplice, HsQuote, HsExpr, LHsExpr, LHsType,
+ LPat, LHsDecl, ThModFinalizers )
import qualified Language.Haskell.TH as TH
tcSpliceExpr :: HsSplice GhcRn
@@ -19,11 +19,11 @@ tcSpliceExpr :: HsSplice GhcRn
-> TcM (HsExpr GhcTc)
tcTypedBracket :: HsExpr GhcRn
- -> HsTypedBracket GhcRn
+ -> LHsExpr GhcRn
-> ExpRhoType
-> TcM (HsExpr GhcTc)
tcUntypedBracket :: HsExpr GhcRn
- -> HsUntypedBracket GhcRn
+ -> HsQuote GhcRn
-> [PendingRnSplice]
-> ExpRhoType
-> TcM (HsExpr GhcTc)