[commit: ghc] wip/tc/typeable-with-kinds: Bug-fix: the coercion was the wrong way around. (c95620a)
git at git.haskell.org
git at git.haskell.org
Sat Mar 7 16:43:09 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tc/typeable-with-kinds
Link : http://ghc.haskell.org/trac/ghc/changeset/c95620a82cc98788d49a23a65c897cc0070426db/ghc
>---------------------------------------------------------------
commit c95620a82cc98788d49a23a65c897cc0070426db
Author: Iavor S. Diatchki <diatchki at galois.com>
Date: Tue Feb 10 14:37:47 2015 -0800
Bug-fix: the coercion was the wrong way around.
>---------------------------------------------------------------
c95620a82cc98788d49a23a65c897cc0070426db
compiler/deSugar/DsBinds.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 6db3cae..eebf298 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -945,7 +945,7 @@ dsEvTypeable ev =
$ mkLams [mkWildValBinder proxyT] (Var repName)
-- package up the method as `Typeable` dictionary
- return (mkCast method (getTypeableCo tyCl ty))
+ return $ mkCast method $ mkSymCo $ getTypeableCo tyCl ty
where
-- co: method -> Typeable k t
@@ -958,7 +958,7 @@ dsEvTypeable ev =
getRep tc (ev,t) =
do typeableExpr <- dsEvTerm ev
let co = getTypeableCo tc t
- method = mkCast typeableExpr (mkSymCo co)
+ method = mkCast typeableExpr co
proxy = mkTyApps (Var proxyHashId) [t]
return (mkApps method [proxy])
More information about the ghc-commits
mailing list