[commit: ghc] master: Apply Note [EtaAppCo] in OptCoercion to another case (3eaa55d)

git at git.haskell.org git at git.haskell.org
Mon Apr 2 02:44:23 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3eaa55dcbcd860a035dfe2cae96866e96b008f67/ghc

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

commit 3eaa55dcbcd860a035dfe2cae96866e96b008f67
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date:   Sun Mar 11 09:45:31 2018 -0400

    Apply Note [EtaAppCo] in OptCoercion to another case


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

3eaa55dcbcd860a035dfe2cae96866e96b008f67
 compiler/types/OptCoercion.hs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs
index 11aeb93..3de51c3 100644
--- a/compiler/types/OptCoercion.hs
+++ b/compiler/types/OptCoercion.hs
@@ -577,9 +577,8 @@ opt_trans_rule is in_co1@(FunCo r1 co1a co1b) in_co2@(FunCo r2 co2a co2b)
     mkFunCo r1 (opt_trans is co1a co2a) (opt_trans is co1b co2b)
 
 opt_trans_rule is in_co1@(AppCo co1a co1b) in_co2@(AppCo co2a co2b)
-  = fireTransRule "TrPushApp" in_co1 in_co2 $
-    mkAppCo (opt_trans is co1a co2a)
-            (opt_trans is co1b co2b)
+  -- Must call opt_trans_rule_app; see Note [EtaAppCo]
+  = opt_trans_rule_app is in_co1 in_co2 co1a [co1b] co2a [co2b]
 
 -- Eta rules
 opt_trans_rule is co1@(TyConAppCo r tc cos1) co2



More information about the ghc-commits mailing list