summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/typecheck/TcRules.hs5
-rw-r--r--compiler/typecheck/TcSimplify.hs6
2 files changed, 6 insertions, 5 deletions
diff --git a/compiler/typecheck/TcRules.hs b/compiler/typecheck/TcRules.hs
index aafb5209e5..193695af45 100644
--- a/compiler/typecheck/TcRules.hs
+++ b/compiler/typecheck/TcRules.hs
@@ -73,8 +73,9 @@ tcRule (HsRule name act hs_bndrs lhs fv_lhs rhs fv_rhs)
tcExtendIdEnv id_bndrs $
do { -- See Note [Solve order for RULES]
((lhs', rule_ty), lhs_wanted) <- captureConstraints (tcInferRho lhs)
- ; (lhs_inst_simple, _) <- runTcS (instantiateCts (wc_simple lhs_wanted))
- ; let lhs_inst = lhs_wanted { wc_simple = lhs_inst_simple }
+ ; let lhs_wanted_simple = wc_simple lhs_wanted
+ ; (lhs_inst_simple, _) <- runTcS (instantiateCts lhs_wanted_simple)
+ ; let lhs_inst = lhs_wanted { wc_simple = lhs_inst_simple `unionBags` lhs_wanted_simple }
; (rhs', rhs_wanted) <- captureConstraints (tcPolyMonoExpr rhs rule_ty)
; return (lhs', lhs_inst, rhs', rhs_wanted, rule_ty) }
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index e95c9f7e77..2fd74b86ad 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -8,9 +8,9 @@ module TcSimplify(
simplifyTop, simplifyInteractive,
solveWantedsTcM,
- -- For Rules we need these three
- solveWanteds, runTcS, approximateWC,
- instantiateCts
+ -- For Rules we need these
+ solveWanteds, runTcS, runTcSWithEvBinds,
+ approximateWC, instantiateCts
) where
#include "HsVersions.h"