From 7bd1a6a2d6ba6acfa19ffe46cb535f0ce427dc86 Mon Sep 17 00:00:00 2001 From: Roman Leshchinskiy Date: Thu, 26 Nov 2009 23:22:19 +0000 Subject: [PATCH] Fix arities of mapFB and zipFB --- GHC/Base.lhs | 2 +- GHC/List.lhs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 1.7.10.4