From: Roman Leshchinskiy Date: Thu, 26 Nov 2009 23:22:19 +0000 (+0000) Subject: Fix arities of mapFB and zipFB X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7bd1a6a2d6ba6acfa19ffe46cb535f0ce427dc86;p=ghc-base.git Fix arities of mapFB and zipFB --- diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 2093ab6..90c4c21 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -359,7 +359,7 @@ map f (x:xs) = f x : map f xs -- Note eta expanded mapFB :: (elt -> lst -> lst) -> (a -> elt) -> a -> lst -> lst {-# INLINE [0] mapFB #-} -mapFB c f x ys = c (f x) ys +mapFB c f = \x ys -> c (f x) ys -- The rules for map work like this. -- diff --git a/GHC/List.lhs b/GHC/List.lhs index 87a9dbd..cb8f0eb 100644 --- a/GHC/List.lhs +++ b/GHC/List.lhs @@ -647,7 +647,7 @@ zip _ _ = [] {-# INLINE [0] zipFB #-} zipFB :: ((a, b) -> c -> d) -> a -> b -> c -> d -zipFB c x y r = (x,y) `c` r +zipFB c = \x y r -> (x,y) `c` r {-# RULES "zip" [~1] forall xs ys. zip xs ys = build (\c n -> foldr2 (zipFB c) n xs ys)