[commit: ghc] wip/impredicativity: Change rule for canonicalization of <~ (a406ce2)
git at git.haskell.org
git at git.haskell.org
Wed Jul 29 09:37:58 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/impredicativity
Link : http://ghc.haskell.org/trac/ghc/changeset/a406ce26198357e137b18c2d388899113be86cb6/ghc
>---------------------------------------------------------------
commit a406ce26198357e137b18c2d388899113be86cb6
Author: Alejandro Serrano <trupill at gmail.com>
Date: Wed Jul 29 08:46:14 2015 +0200
Change rule for canonicalization of <~
Now, if the LHS is not a forall, we always turn it into ~.
>---------------------------------------------------------------
a406ce26198357e137b18c2d388899113be86cb6
compiler/typecheck/TcCanonical.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/typecheck/TcCanonical.hs b/compiler/typecheck/TcCanonical.hs
index b1ea1da..169faee 100644
--- a/compiler/typecheck/TcCanonical.hs
+++ b/compiler/typecheck/TcCanonical.hs
@@ -1708,7 +1708,7 @@ can_instance_of (CInstanceOfCan { cc_ev = ev, cc_lhs = lhs, cc_rhs = rhs })
= can_instance_inst ev lhs rhs
-- case InstanceOf (T ...) sigma --> T ... ~ sigma
-- case InstanceOf var sigma --> var ~ sigma, var immutable
- | is_tyapp_or_skolem lhs
+ | not (is_forall lhs) -- is_tyapp_or_skolem lhs
= can_instance_to_eq ev lhs rhs
-- already canonical
| otherwise = continueWith (CIrredEvCan { cc_ev = ev })
More information about the ghc-commits
mailing list