diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-07-22 22:01:37 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-07-25 22:08:30 +0200 |
commit | 50d9bc4e79b81972cf8bab1e9b7a5923e0e9b421 (patch) | |
tree | b1890de087d97e15b4bcd30a5eebc9b9bc7faec8 /compiler | |
parent | 460505345e500eb902da9737c75c077d5fc5ef66 (diff) | |
download | haskell-wip/T21920.tar.gz |
Fix TH + defer-type-errors interaction (#21920)wip/T21920
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')
-rw-r--r-- | compiler/GHC/Tc/Gen/Splice.hs | 6 |
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 |