summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/deSugar/DsBinds.hs5
-rw-r--r--compiler/typecheck/TcRnTypes.hs12
2 files changed, 12 insertions, 5 deletions
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index db7acfd51c..6524e102d2 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -184,8 +184,9 @@ dsHsBind dflags (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
, abs_binds = binds, abs_sig = has_sig })
= do { ds_binds <- addDictsDs (listToBag dicts) $
dsLHsBinds binds
- -- addDictsDs: push type constraints deeper
- -- for inner pattern match check
+ -- addDictsDs: push type constraints deeper
+ -- for inner pattern match check
+ -- See Check, Note [Type and Term Equality Propagation]
; ds_ev_binds <- dsTcEvBinds_s ev_binds
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index e8f0762d94..6627c25464 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -385,9 +385,15 @@ instance ContainsModule DsGblEnv where
data DsLclEnv = DsLclEnv {
dsl_meta :: DsMetaEnv, -- Template Haskell bindings
dsl_loc :: RealSrcSpan, -- To put in pattern-matching error msgs
- dsl_dicts :: Bag EvVar, -- Constraints from GADT pattern-matching
- dsl_tm_cs :: Bag SimpleEq,
- dsl_pm_iter :: IORef Int -- no iterations for pmcheck
+
+ -- See Note [Note [Type and Term Equality Propagation] in Check.hs
+ -- These two fields are augmented as we walk inwards,
+ -- through each patttern match in turn
+ dsl_dicts :: Bag EvVar, -- Constraints from GADT pattern-matching
+ dsl_tm_cs :: Bag SimpleEq, -- Constraints form term-level pattern matching
+
+ dsl_pm_iter :: IORef Int -- Number of iterations for pmcheck so far
+ -- We fail if this gets too big
}
-- Inside [| |] brackets, the desugarer looks