[commit: ghc] master: Remove eta-expansion in Rules.match (5d04603)

git at git.haskell.org git at git.haskell.org
Tue Feb 11 17:14:44 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5d04603b33d2855657745d15f698664a444f6550/ghc

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

commit 5d04603b33d2855657745d15f698664a444f6550
Author: Joachim Breitner <breitner at kit.edu>
Date:   Tue Feb 11 17:46:05 2014 +0100

    Remove eta-expansion in Rules.match
    
    It validates and nofib shows no change, so possibly dead code. Removing in the
    interest of code cleanliness, someone disagrees please revert (and preferably
    add a testcase, or at least describe the situation this is important in in a
    Note).


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

5d04603b33d2855657745d15f698664a444f6550
 compiler/specialise/Rules.lhs |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/compiler/specialise/Rules.lhs b/compiler/specialise/Rules.lhs
index c85bc06..70fc09a 100644
--- a/compiler/specialise/Rules.lhs
+++ b/compiler/specialise/Rules.lhs
@@ -681,14 +681,6 @@ match renv subst (Lam x1 e1) e2
                      , rv_fltR = delBndr (rv_fltR renv) x2 }
     in  match renv' subst e1 e2
 
--- Eta expansion the other way
---      M  ~  (\y.N)    iff   M y     ~  N
-match renv subst e1 (Lam x2 e2)
-  = match renv' subst (App e1 (varToCoreExpr new_x)) e2
-  where
-    (rn_env', new_x) = rnEtaR (rv_lcl renv) x2
-    renv' = renv { rv_lcl = rn_env' }
-
 match renv subst (Case e1 x1 ty1 alts1) (Case e2 x2 ty2 alts2)
   = do  { subst1 <- match_ty renv subst ty1 ty2
         ; subst2 <- match renv subst1 e1 e2



More information about the ghc-commits mailing list