summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-10-18 15:21:16 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-10-20 12:08:55 +0100
commitc1efc6e64edf140c2e5a09a3ef44b719c5d77f70 (patch)
tree6f2a8896d0ad686e5dca452bcdbca63c75cb3558
parentafc04b2689e5b936ecc8689c194a0ed2c0a2e6da (diff)
downloadhaskell-c1efc6e64edf140c2e5a09a3ef44b719c5d77f70.tar.gz
Comments and white space
-rw-r--r--compiler/typecheck/TcCanonical.hs2
-rw-r--r--compiler/typecheck/TcFlatten.hs3
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index e7f1259e9c..be8bbeecba 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 9fd9cadde7..4d23b55c5f 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