[commit: ghc] wip/tdammers/D4394: Another fix as per D4394 (c1d5e19)
git at git.haskell.org
git at git.haskell.org
Thu Mar 22 11:02:45 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tdammers/D4394
Link : http://ghc.haskell.org/trac/ghc/changeset/c1d5e19d42817b5a0a079a32edd4311280e5e7ff/ghc
>---------------------------------------------------------------
commit c1d5e19d42817b5a0a079a32edd4311280e5e7ff
Author: Tobias Dammers <tdammers at gmail.com>
Date: Mon Mar 5 12:50:35 2018 +0100
Another fix as per D4394
>---------------------------------------------------------------
c1d5e19d42817b5a0a079a32edd4311280e5e7ff
compiler/types/Coercion.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/types/Coercion.hs b/compiler/types/Coercion.hs
index dd4d055..8550e85 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1295,7 +1295,7 @@ mkCoCast c g
| tc `hasKey` heqTyConKey = (4, Nominal)
| tc `hasKey` coercibleTyConKey = (3, Representational)
| otherwise = pprPanic "mkCoCast" (ppr g $$ ppr (coercionKind g))
- co_list = decomposeCo n_args g (replicate (n_args - 2) Nominal ++ repeat role)
+ co_list = decomposeCo (tyConArity tc) g (tyConRolesRepresentational tc)
g1 = co_list `getNth` (n_args - 2)
g2 = co_list `getNth` (n_args - 1)
More information about the ghc-commits
mailing list