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

Comments only

parent 79e0a10e
......@@ -1128,7 +1128,7 @@ canEqTyVarTyVar ev eq_rel swapped tv1 tv2
| incompat_kind = incompatibleKind ev xi1 k1 xi2 k2
-- We don't do this any more
-- See Note [Orientation of equalities with fmvs] in TcSMonad
-- See Note [Orientation of equalities with fmvs] in TcFlatten
-- | isFmvTyVar tv1 = do_fmv swapped tv1 xi1 xi2 co1 co2
-- | isFmvTyVar tv2 = do_fmv (flipSwap swapped) tv2 xi2 xi1 co2 co1
......@@ -1159,7 +1159,7 @@ canEqTyVarTyVar ev eq_rel swapped tv1 tv2
, cc_rhs = xi2, cc_eq_rel = eq_rel })
{- We don't do this any more
See Note [Orientation of equalities with fmvs] in TcSMonad
See Note [Orientation of equalities with fmvs] in TcFlatten
-- tv1 is the flatten meta-var
do_fmv swapped tv1 xi1 xi2 co1 co2
| same_kind
......
......@@ -264,8 +264,9 @@ This is a real dilemma. CURRENT SOLUTION:
CFunEqCan F fmv ~ fmv, because fmv := F fmv would make an ininite
type. Instead we unify fmv:=a, AND record that we have done so.
If any such "non-CFunEqCan unifications" take place, iterate the
entire process. This is done by the 'go' loop in solveSimpleWanteds.
If any such "non-CFunEqCan unifications" take place (in
unflatten_eq in TcFlatten.unflatten) iterate the entire process.
This is done by the 'go' loop in solveSimpleWanteds.
This story does not feel right but it's the best I can do; and the
iteration only happens in pretty obscure circumstances.
......@@ -1368,7 +1369,7 @@ unflatten tv_eqs funeqs
; funeqs <- foldrBagM (unflatten_funeq dflags) emptyCts funeqs
; traceTcS "Unflattening 1" $ braces (pprCts funeqs)
-- Step 2: unify the irreds, if possible
-- Step 2: unify the tv_eqs, if possible
; tv_eqs <- foldrBagM (unflatten_eq dflags tclvl) emptyCts tv_eqs
; traceTcS "Unflattening 2" $ braces (pprCts tv_eqs)
......@@ -1376,7 +1377,7 @@ unflatten tv_eqs funeqs
; funeqs <- mapBagM finalise_funeq funeqs
; traceTcS "Unflattening 3" $ braces (pprCts funeqs)
-- Step 4: remove any irreds that look like ty ~ ty
-- Step 4: remove any tv_eqs that look like ty ~ ty
; tv_eqs <- foldrBagM finalise_eq emptyCts tv_eqs
; let all_flat = tv_eqs `andCts` funeqs
......
......@@ -994,7 +994,7 @@ Note [Examples of how the inert_model helps completeness]
[D] d4: fmv2 ~ a
At this point we are stuck so we unflatten this set:
See Note [Orientation of equalities with fmvs]
See Note [Orientation of equalities with fmvs] in TcFlatten
[W] w1: F fmv2 ~ fmv1
[W] w2: UnF fmv1 ~ fmv2
[W] w5: fmv1 ~ fsk1
......
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