diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-02-08 13:36:31 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-02-08 15:08:49 +0000 |
commit | f79b9ec98ac1ea1d6ce1995a29e2a24737518e77 (patch) | |
tree | f6209d0da1ddba77f81f0e4470e921b41d039def /compiler/typecheck/TcSimplify.hs | |
parent | d6b68be1100203aa13755457f89ee4bbb0297473 (diff) | |
download | haskell-f79b9ec98ac1ea1d6ce1995a29e2a24737518e77.tar.gz |
Use runTcSDeriveds for simplifyDefault
This is a small refactoring, no change in behaviour.
Diffstat (limited to 'compiler/typecheck/TcSimplify.hs')
-rw-r--r-- | compiler/typecheck/TcSimplify.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 379e17fdb3..8a57877551 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -396,13 +396,14 @@ simplifyDefault :: ThetaType -- Wanted; has no type variables in it -> TcM () -- Succeeds if the constraint is soluble simplifyDefault theta = do { traceTc "simplifyInteractive" empty - ; wanted <- newWanteds DefaultOrigin theta - ; unsolved <- simplifyWantedsTcM wanted - + ; loc <- getCtLocM DefaultOrigin Nothing + ; let wanted = [ CtDerived { ctev_pred = pred + , ctev_loc = loc } + | pred <- theta ] + ; unsolved <- runTcSDeriveds (solveWanteds (mkSimpleWC wanted)) ; traceTc "reportUnsolved {" empty ; reportAllUnsolved unsolved ; traceTc "reportUnsolved }" empty - ; return () } ------------------ |