[commit: ghc] master: Comments only (a192d6b)

git at git.haskell.org git at git.haskell.org
Fri Aug 7 11:32:59 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a192d6b46d86141b7f184df219b36c13c420e6ef/ghc

>---------------------------------------------------------------

commit a192d6b46d86141b7f184df219b36c13c420e6ef
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Aug 7 12:32:48 2015 +0100

    Comments only


>---------------------------------------------------------------

a192d6b46d86141b7f184df219b36c13c420e6ef
 compiler/typecheck/TcCanonical.hs | 4 ++--
 compiler/typecheck/TcFlatten.hs   | 9 +++++----
 compiler/typecheck/TcSMonad.hs    | 2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index f37ad3e..ed3955d 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -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
diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs
index 9df0690..052c158 100644
--- a/compiler/typecheck/TcFlatten.hs
+++ b/compiler/typecheck/TcFlatten.hs
@@ -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
diff --git a/compiler/typecheck/TcSMonad.hs b/compiler/typecheck/TcSMonad.hs
index cd3d3c9..3721975 100644
--- a/compiler/typecheck/TcSMonad.hs
+++ b/compiler/typecheck/TcSMonad.hs
@@ -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



More information about the ghc-commits mailing list