[commit: ghc] wip/tdammers/D4394: Fix bug in invocation of decomposeFunCo (0674a60)

git at git.haskell.org git at git.haskell.org
Wed Apr 4 12:15:31 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/tdammers/D4394
Link       : http://ghc.haskell.org/trac/ghc/changeset/0674a60e420e02e9043cf6e250e92a978d71885a/ghc

>---------------------------------------------------------------

commit 0674a60e420e02e9043cf6e250e92a978d71885a
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Apr 4 13:13:11 2018 +0100

    Fix bug in invocation of decomposeFunCo
    
    We were invoking decomposeFunCo with the wrong role argument;
    i.e. one that did not match the pre-condition of decomposeFunCo,
    that that the role argument is the role of the coercion argument.


>---------------------------------------------------------------

0674a60e420e02e9043cf6e250e92a978d71885a
 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 2807512..556dd8e 100644
--- a/compiler/types/Coercion.hs
+++ b/compiler/types/Coercion.hs
@@ -290,7 +290,7 @@ decomposePiCos orig_kind orig_args orig_co = go [] orig_subst orig_kind orig_arg
         --          ty :: s2
         -- need arg_co :: s2 ~ s1
         --      res_co :: t1 ~ t2
-      = let (sym_arg_co, res_co) = decomposeFunCo Representational co
+      = let (sym_arg_co, res_co) = decomposeFunCo Nominal co
             arg_co               = mkSymCo sym_arg_co
         in
         go (arg_co : acc_arg_cos) subst res_ki tys res_co



More information about the ghc-commits mailing list