From e74a10138daf9fd70888a1841bd6cc93b9cca9f2 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 8 Jun 2010 08:25:31 +0000 Subject: [PATCH] add an INLINE to the list version of traverse, to enable fusion --- Data/Traversable.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Data/Traversable.hs b/Data/Traversable.hs index 0df8bd4..28fa761 100644 --- a/Data/Traversable.hs +++ b/Data/Traversable.hs @@ -107,6 +107,7 @@ instance Traversable Maybe where traverse f (Just x) = Just <$> f x instance Traversable [] where + {-# INLINE traverse #-} -- so that traverse can fuse traverse f = Prelude.foldr cons_f (pure []) where cons_f x ys = (:) <$> f x <*> ys -- 1.7.10.4