summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcSimplify.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-02-08 13:36:31 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2016-02-08 15:08:49 +0000
commitf79b9ec98ac1ea1d6ce1995a29e2a24737518e77 (patch)
treef6209d0da1ddba77f81f0e4470e921b41d039def /compiler/typecheck/TcSimplify.hs
parentd6b68be1100203aa13755457f89ee4bbb0297473 (diff)
downloadhaskell-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.hs9
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 () }
------------------