From c1efc6e64edf140c2e5a09a3ef44b719c5d77f70 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 18 Oct 2017 15:21:16 +0100 Subject: Comments and white space --- 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 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 -- cgit v1.2.1