[commit: ghc] ghc-7.10: Fix #10489 (243d57c)
git at git.haskell.org
git at git.haskell.org
Thu Oct 22 15:08:58 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/243d57cfb71fa41ed4ae604e79aaaeb13646b6a1/ghc
>---------------------------------------------------------------
commit 243d57cfb71fa41ed4ae604e79aaaeb13646b6a1
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Fri Jun 5 09:56:21 2015 -0400
Fix #10489
Dang, roles are annoying.
Test case: typecheck/should_compile/T10489
Cherry-Picked-From: 61b96a86c5342fb1c850361177d60fe855d948f6
Conflicts:
testsuite/tests/typecheck/should_compile/all.T
>---------------------------------------------------------------
243d57cfb71fa41ed4ae604e79aaaeb13646b6a1
compiler/hsSyn/HsUtils.hs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler/hsSyn/HsUtils.hs b/compiler/hsSyn/HsUtils.hs
index 4a80ebd..ad438e5 100644
--- a/compiler/hsSyn/HsUtils.hs
+++ b/compiler/hsSyn/HsUtils.hs
@@ -504,9 +504,10 @@ mkHsWrapPat :: HsWrapper -> Pat id -> Type -> Pat id
mkHsWrapPat co_fn p ty | isIdHsWrapper co_fn = p
| otherwise = CoPat co_fn p ty
+-- input coercion is Nominal
mkHsWrapPatCo :: TcCoercion -> Pat id -> Type -> Pat id
mkHsWrapPatCo co pat ty | isTcReflCo co = pat
- | otherwise = CoPat (mkWpCast co) pat ty
+ | otherwise = CoPat (mkWpCast (mkTcSubCo co)) pat ty
mkHsDictLet :: TcEvBinds -> LHsExpr Id -> LHsExpr Id
mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr
More information about the ghc-commits
mailing list