From: simonpj Date: Fri, 14 Dec 2001 17:24:19 +0000 (+0000) Subject: [project @ 2001-12-14 17:24:19 by simonpj] X-Git-Tag: Approximately_9120_patches~382 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=145958bf9d87eb1aa780d2976ec49a4ae2287d66;p=ghc-hetmet.git [project @ 2001-12-14 17:24:19 by simonpj] Add a rule for foldr k z [x] --- diff --git a/ghc/lib/std/PrelBase.lhs b/ghc/lib/std/PrelBase.lhs index 0e7541e..dbff5aa 100644 --- a/ghc/lib/std/PrelBase.lhs +++ b/ghc/lib/std/PrelBase.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelBase.lhs,v 1.58 2001/12/14 12:05:15 simonmar Exp $ +% $Id: PrelBase.lhs,v 1.59 2001/12/14 17:24:19 simonpj Exp $ % % (c) The University of Glasgow, 1992-2000 % @@ -283,7 +283,8 @@ augment g xs = g (:) xs -- for short lists, I suppose. -- "foldr/cons" forall k z x xs. foldr k z (x:xs) = k x (foldr k z xs) -"foldr/nil" forall k z. foldr k z [] = z +"foldr/single" forall k z x. foldr k z [x] = k x z +"foldr/nil" forall k z. foldr k z [] = z "augment/build" forall (g::forall b. (a->b->b) -> b -> b) (h::forall b. (a->b->b) -> b -> b) .