[commit: ghc] wip/rae-new-coercible: Drop Derived `canRewrite` Derived, as per discussions with SPJ & DV (1383e0d)
git at git.haskell.org
git at git.haskell.org
Mon Dec 8 17:12:45 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rae-new-coercible
Link : http://ghc.haskell.org/trac/ghc/changeset/1383e0d72788959c8be9877b7c451e6f271d61f0/ghc
>---------------------------------------------------------------
commit 1383e0d72788959c8be9877b7c451e6f271d61f0
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Mon Dec 8 12:04:03 2014 -0500
Drop Derived `canRewrite` Derived, as per discussions with SPJ & DV
>---------------------------------------------------------------
1383e0d72788959c8be9877b7c451e6f271d61f0
compiler/typecheck/TcCanonical.hs | 13 -------------
compiler/typecheck/TcFlatten.hs | 2 --
2 files changed, 15 deletions(-)
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index fcf5c4e..f903ba8 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -380,19 +380,6 @@ canHole ev occ hole_sort
canEqNC :: CtEvidence -> EqRel -> Type -> Type -> TcS (StopOrContinue Ct)
canEqNC ev eq_rel ty1 ty2
= can_eq_nc ev eq_rel ty1 ty1 ty2 ty2
- `andWhenContinue` \ ct ->
- do { emitReprEq ct
- ; continueWith ct }
-
-emitReprEq :: Ct -> TcS ()
-emitReprEq (CTyEqCan { cc_ev = ev@(CtDerived {}), cc_tyvar = tv, cc_rhs = rhs
- , cc_eq_rel = NomEq })
- = emitWorkNC [ev { ctev_pred = mkTcReprEqPred (mkTyVarTy tv) rhs }]
- -- This works only on Deriveds, because nominal Givens can rewrite
- -- representational equalities. See Note [eqCanRewrite] in TcFlatten
-
--- Nothing to do for other equalities
-emitReprEq _ = return ()
can_eq_nc
:: CtEvidence
diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs
index 1b7698c..4a8b026 100644
--- a/compiler/typecheck/TcFlatten.hs
+++ b/compiler/typecheck/TcFlatten.hs
@@ -1183,8 +1183,6 @@ eqCanRewriteFR :: CtFlavourRole -> CtFlavourRole -> Bool
-- See Note [eqCanRewrite]
eqCanRewriteFR (Given, NomEq) (_, _) = True
eqCanRewriteFR (Given, ReprEq) (_, ReprEq) = True
-eqCanRewriteFR (Derived, NomEq) (Derived, NomEq) = True
-eqCanRewriteFR (Derived, ReprEq) (Derived, ReprEq) = True
eqCanRewriteFR _ _ = False
canRewriteOrSame :: CtEvidence -> CtEvidence -> Bool
More information about the ghc-commits
mailing list