diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-03-09 01:33:29 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-03-18 05:10:58 -0400 |
commit | 19163397000ae3ce9886a75bef900d35774d864e (patch) | |
tree | 3d02356f95ef57a65e96e5eed9368883603ef232 /compiler/GHC/Tc | |
parent | 8561c1afdbbda73a31cb8f8f1e80d1f403673e9b (diff) | |
download | haskell-19163397000ae3ce9886a75bef900d35774d864e.tar.gz |
Type-checking untyped brackets
When HsExpr GhcTc, the HsBracket constructor should hold a HsBracket
GhcRn, rather than an HsBracket GhcTc.
We make use of the HsBracket p extension constructor (XBracket
(XXBracket p)) to hold an HsBracket GhcRn when the pass is GhcTc
See !4782 https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4782
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r-- | compiler/GHC/Tc/Gen/Splice.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs index 674a3fc830..5acffaca7d 100644 --- a/compiler/GHC/Tc/Gen/Splice.hs +++ b/compiler/GHC/Tc/Gen/Splice.hs @@ -217,7 +217,7 @@ tcTypedBracket rn_expr brack@(TExpBr _ expr) res_ty rn_expr (unLoc (mkHsApp (mkLHsWrap (applyQuoteWrapper wrapper) (nlHsTyApp codeco [rep, expr_ty])) - (noLocA (HsBracket (HsBracketTc bracket_ty (Just wrapper) ps') brack)))) + (noLocA (HsBracket (HsBracketTc bracket_ty (Just wrapper) ps') (XBracket brack))))) meta_ty res_ty } tcTypedBracket _ other_brack _ = pprPanic "tcTypedBracket" (ppr other_brack) @@ -246,7 +246,7 @@ tcUntypedBracket rn_expr brack ps res_ty -- Unify the overall type of the bracket with the expected result -- type ; tcWrapResultO BracketOrigin rn_expr - (HsBracket (HsBracketTc expected_type brack_info ps') brack) + (HsBracket (HsBracketTc expected_type brack_info ps') (XBracket brack)) expected_type res_ty } |