@@ -10,11 +10,14 @@ module Text.Hakyll.CreateContext
1010 , combineWithUrl
1111 ) where
1212
13+import Prelude hiding (id)
14+
1315import qualified Data.Map as M
14−import Control.Arrow (second, arr, (&&&))
16+import Control.Arrow (second, arr, (&&&), (***))
1517import Control.Monad (liftM2)
1618import Control.Applicative ((<$>))
1719import Control.Arrow ((>>>))
20+import Control.Category (id)
1821
1922import Text.Hakyll.Context
2023import Text.Hakyll.HakyllAction
@@ -73,9 +76,10 @@ createListing url templates renderables additional =
7376--
7477addField :: String -- ^ Key
7578 -> Either String (HakyllAction () String) -- ^ Value
76− -> HakyllAction a Context -- ^ Target
77− -> HakyllAction a Context -- ^ Result
78−addField key value target = value' &&& target >>> arr (uncurry insert)
79+ -> HakyllAction Context Context -- ^ Result
80+addField key value = arr (const ()) &&& id
81+ >>> value' *** id
82+ >>> arr (uncurry insert)
7983 where
8084 value' = arr (const ()) >>> either (arr . const) id value
8185 insert v = Context . M.insert key v . unContext