[commit: ghc] master: Comments and white space (c1efc6e)

git at git.haskell.org git at git.haskell.org
Fri Oct 20 12:01:58 UTC 2017


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

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

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

commit c1efc6e64edf140c2e5a09a3ef44b719c5d77f70
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Oct 18 15:21:16 2017 +0100

    Comments and white space


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

c1efc6e64edf140c2e5a09a3ef44b719c5d77f70
 compiler/typecheck/TcCanonical.hs | 2 +-
 compiler/typecheck/TcFlatten.hs   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index e7f1259..be8bbee 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -1845,7 +1845,7 @@ rewriteEvidence old_ev new_pred co
   | isTcReflCo co -- See Note [Rewriting with Refl]
   = continueWith (old_ev { ctev_pred = new_pred })
 
-rewriteEvidence ev@(CtGiven { ctev_evar = old_evar , ctev_loc = loc }) new_pred co
+rewriteEvidence ev@(CtGiven { ctev_evar = old_evar, ctev_loc = loc }) new_pred co
   = do { new_ev <- newGivenEvVar loc (new_pred, new_tm)
        ; continueWith new_ev }
   where
diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs
index 9fd9cad..4d23b55 100644
--- a/compiler/typecheck/TcFlatten.hs
+++ b/compiler/typecheck/TcFlatten.hs
@@ -939,6 +939,9 @@ flatten_one (AppTy ty1 ty2)
   = do { (xi1,co1) <- flatten_one ty1
        ; eq_rel <- getEqRel
        ; case (eq_rel, nextRole xi1) of
+           -- We need nextRole here because although ty1 definitely
+           -- isn't a TyConApp, xi1 might be.
+           -- ToDo: but can such a substitution change roles??
            (NomEq,  _)                -> flatten_rhs xi1 co1 NomEq
            (ReprEq, Nominal)          -> flatten_rhs xi1 co1 NomEq
            (ReprEq, Representational) -> flatten_rhs xi1 co1 ReprEq



More information about the ghc-commits mailing list