summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Util/Arrow.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-07 16:01:09 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-07 16:01:09 +0100
commitf56eb538b6e366202f796c84eee46e620f519ff6 (patch)
tree604126c23142bcd35c5451df38e52b9cdca9decc /src/Hakyll/Core/Util/Arrow.hs
parent986a74b3af664b824a5c67524d2433d7e990f502 (diff)
downloadhakyll-f56eb538b6e366202f796c84eee46e620f519ff6.tar.gz
Lazy pattern matching for compiler composition
Diffstat (limited to 'src/Hakyll/Core/Util/Arrow.hs')
-rw-r--r--src/Hakyll/Core/Util/Arrow.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Util/Arrow.hs b/src/Hakyll/Core/Util/Arrow.hs
index 49cbf2b..dfcb7da 100644
--- a/src/Hakyll/Core/Util/Arrow.hs
+++ b/src/Hakyll/Core/Util/Arrow.hs
@@ -7,6 +7,8 @@ module Hakyll.Core.Util.Arrow
, mapA
) where
+import Prelude hiding (id)
+import Control.Category (id)
import Control.Arrow ( Arrow, ArrowChoice, (&&&), arr, (>>^), (|||)
, (>>>), (***)
)
@@ -30,7 +32,7 @@ unitA = constA ()
mapA :: ArrowChoice a
=> a b c
-> a [b] [c]
-mapA f = arr listEither >>> arr id ||| (f *** mapA f >>> arr (uncurry (:)))
+mapA f = arr listEither >>> id ||| (f *** mapA f >>> arr (uncurry (:)))
where
listEither [] = Left []
listEither (x : xs) = Right (x, xs)