diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-03-11 18:14:41 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-03-15 22:55:37 -0400 |
commit | b5571f1aae3975a7a44e80b060d87bbea34390b9 (patch) | |
tree | 7586cf966f1d1bee3199914244ed5a820207809d /compiler/GHC/Tc/Solver.hs | |
parent | 707b94cb1b08a86c703ebe0d06f185888743d7c0 (diff) | |
download | haskell-wip/exception-context-9.6.tar.gz |
warningwip/exception-context-9.6
Diffstat (limited to 'compiler/GHC/Tc/Solver.hs')
-rw-r--r-- | compiler/GHC/Tc/Solver.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs index 847ddb6887..a35fc71928 100644 --- a/compiler/GHC/Tc/Solver.hs +++ b/compiler/GHC/Tc/Solver.hs @@ -542,10 +542,11 @@ simplifyTopWanteds wanteds defaultExceptionContext :: Ct -> MaybeT TcS () defaultExceptionContext ct = do { ClassPred cls tys <- pure $ classifyPredType (ctPred ct) - ; Just {} <- pure $ isCallStackPred cls tys + ; Just {} <- pure $ isExceptionContextPred cls tys ; emptyEC <- Var <$> lift (lookupId emptyExceptionContextName) ; let ev = ctEvidence ct ; let ev_tm = mkEvCast emptyEC (wrapIP (ctEvPred ev)) + ; lift $ warnTcS $ TcRnDefaultedExceptionContext (ctLoc ct) ; lift $ setEvBindIfWanted ev ev_tm } |