summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-07-22 22:01:37 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-04 02:55:43 -0400
commitb99819bdaa11881f0b0bec29ef6274a8c8e565a0 (patch)
treef6f9f324bfa90436a5b3649ed87ed6cf98fa8038 /compiler/GHC/Tc/Gen
parent35aef18de6d04473da95cb5a19d5cc111ee7ec45 (diff)
downloadhaskell-b99819bdaa11881f0b0bec29ef6274a8c8e565a0.tar.gz
Fix TH + defer-type-errors interaction (#21920)
Previously, we had to disable defer-type-errors in splices because of #7276. But this fix is no longer necessary, the test T7276 no longer segfaults and is now correctly deferred.
Diffstat (limited to 'compiler/GHC/Tc/Gen')
-rw-r--r--compiler/GHC/Tc/Gen/Splice.hs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/GHC/Tc/Gen/Splice.hs b/compiler/GHC/Tc/Gen/Splice.hs
index 4c6279a6d9..52205cd944 100644
--- a/compiler/GHC/Tc/Gen/Splice.hs
+++ b/compiler/GHC/Tc/Gen/Splice.hs
@@ -877,12 +877,6 @@ tcTopSpliceExpr :: SpliceType -> TcM (LHsExpr GhcTc) -> TcM (LHsExpr GhcTc)
tcTopSpliceExpr isTypedSplice tc_action
= checkNoErrs $ -- checkNoErrs: must not try to run the thing
-- if the type checker fails!
- unsetGOptM Opt_DeferTypeErrors $
- -- Don't defer type errors. Not only are we
- -- going to run this code, but we do an unsafe
- -- coerce, so we get a seg-fault if, say we
- -- splice a type into a place where an expression
- -- is expected (#7276)
setStage (Splice isTypedSplice) $
do { -- Typecheck the expression
(mb_expr', wanted) <- tryCaptureConstraints tc_action