@@ -19,8 +19,7 @@ module Hakyll.Core.Compiler.Internal
1919--------------------------------------------------------------------------------
2020import Control.Applicative (Alternative (..), Applicative,
2121 pure, (<$>), (<*>))
22−import Control.Arrow (Arrow, ArrowChoice, arr, first,
23− left)
22+import Control.Arrow
2423import Control.Category (Category, id, (.))
2524import Control.Monad (liftM2, (<=<))
2625import Control.Monad.Error (ErrorT, catchError, runErrorT,
@@ -137,6 +136,9 @@ instance ArrowChoice Compiler where
137136 left ~(Compiler d j) = Compiler d $ \e -> case e of
138137 Left l -> Left <$> j l
139138 Right r -> Right <$> return r
139+ -- Defined here for efficiency
140+ ~(Compiler d1 j1) ||| ~(Compiler d2 j2) = Compiler (liftM2 S.union d1 d2) $
141+ \e -> case e of Left x -> j1 x; Right y -> j2 y
140142
141143
142144--------------------------------------------------------------------------------