[commit: ghc] wip/tdammers/D4394: Another fix as per D4394 (d5b3da5)
git at git.haskell.org
git at git.haskell.org
Tue Mar 27 14:29:07 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tdammers/D4394
Link : http://ghc.haskell.org/trac/ghc/changeset/d5b3da5fa054c1a159bbd7930e090b2f60515a04/ghc
>---------------------------------------------------------------
commit d5b3da5fa054c1a159bbd7930e090b2f60515a04
Author: Tobias Dammers <tdammers at gmail.com>
Date: Mon Mar 5 12:50:35 2018 +0100
Another fix as per D4394
>---------------------------------------------------------------
d5b3da5fa054c1a159bbd7930e090b2f60515a04
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 0c342a6..6dff0e7 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -1319,7 +1319,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