diff options
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 } |