Commit f79b9ec9 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Use runTcSDeriveds for simplifyDefault

This is a small refactoring, no change in behaviour.
parent d6b68be1
......@@ -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 () }
------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment