[commit: ghc] type-nats-simple: Fix coercion optimization for axiom rules. (2a025e0)

git at git.haskell.org git at git.haskell.org
Mon Sep 9 07:49:37 CEST 2013


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

On branch  : type-nats-simple
Link       : http://ghc.haskell.org/trac/ghc/changeset/2a025e0449aab81c5370b395a6bc2fcb3c96bc1e/ghc

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

commit 2a025e0449aab81c5370b395a6bc2fcb3c96bc1e
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date:   Sun Sep 8 22:41:03 2013 -0700

    Fix coercion optimization for axiom rules.


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

2a025e0449aab81c5370b395a6bc2fcb3c96bc1e
 compiler/types/OptCoercion.lhs |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/types/OptCoercion.lhs b/compiler/types/OptCoercion.lhs
index 1a06445..f63ca38 100644
--- a/compiler/types/OptCoercion.lhs
+++ b/compiler/types/OptCoercion.lhs
@@ -228,8 +228,9 @@ opt_co' env sym _ (SubCo co) = opt_co env sym (Just Representational) co
 -- would allow us to do custom simplifications.
 opt_co' env sym mrole (AxiomRuleCo co ts cs) =
   wrapRole mrole (coaxrRole co) $
+    wrapSym sym $
     AxiomRuleCo co (map (substTy env) ts)
-                   (zipWith (opt_co env sym) (map Just (coaxrAsmpRoles co)) cs)
+                   (zipWith (opt_co env False) (map Just (coaxrAsmpRoles co)) cs)
 
 
 





More information about the ghc-commits mailing list