[commit: ghc] wip/libdw-prof: OptCoercion: Ensure that TyConApps match in arity (3d64db2)
git at git.haskell.org
git at git.haskell.org
Sun May 7 19:38:52 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/libdw-prof
Link : http://ghc.haskell.org/trac/ghc/changeset/3d64db2064e52931623eb03519dbd64b743d3caa/ghc
>---------------------------------------------------------------
commit 3d64db2064e52931623eb03519dbd64b743d3caa
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sun May 7 14:48:41 2017 -0400
OptCoercion: Ensure that TyConApps match in arity
Previously we would
>---------------------------------------------------------------
3d64db2064e52931623eb03519dbd64b743d3caa
compiler/types/OptCoercion.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs
index b1aa646..03e1d6c 100644
--- a/compiler/types/OptCoercion.hs
+++ b/compiler/types/OptCoercion.hs
@@ -378,6 +378,7 @@ opt_univ env sym prov role oty1 oty2
| Just (tc1, tys1) <- splitTyConApp_maybe oty1
, Just (tc2, tys2) <- splitTyConApp_maybe oty2
, tc1 == tc2
+ , equalLength tys1 tys2
-- NB: prov must not be the two interesting ones (ProofIrrel & Phantom);
-- Phantom is already taken care of, and ProofIrrel doesn't relate tyconapps
= let roles = tyConRolesX role tc1
More information about the ghc-commits
mailing list