From: simonpj Date: Fri, 10 Jun 2005 13:19:41 +0000 (+0000) Subject: [project @ 2005-06-10 13:19:41 by simonpj] X-Git-Tag: cmm-merge2~71 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a627279db11b46b68c370002df57b745c1e57ae5;p=ghc-base.git [project @ 2005-06-10 13:19:41 by simonpj] Eta-contract foldr/app RULE to avoid overlap with foldr/id --- diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 32bf498..edb960e 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -362,8 +362,8 @@ augment g xs = g (:) xs "foldr/augment" forall k z xs (g::forall b. (a->b->b) -> b -> b) . foldr k z (augment g xs) = g k (foldr k z xs) -"foldr/id" foldr (:) [] = \x->x -"foldr/app" [1] forall xs ys. foldr (:) ys xs = xs ++ ys +"foldr/id" foldr (:) [] = \x -> x +"foldr/app" [1] forall ys. foldr (:) ys = \xs -> xs ++ ys -- Only activate this from phase 1, because that's -- when we disable the rule that expands (++) into foldr