summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Hakyll/Render.hs2
-rw-r--r--src/Text/Hakyll/RenderAction.hs5
-rw-r--r--src/Text/Hakyll/Renderables.hs6
3 files changed, 6 insertions, 7 deletions
diff --git a/src/Text/Hakyll/Render.hs b/src/Text/Hakyll/Render.hs
index 5915e36..71d95ae 100644
--- a/src/Text/Hakyll/Render.hs
+++ b/src/Text/Hakyll/Render.hs
@@ -89,7 +89,7 @@ renderAndConcatWith manipulation templatePaths renderables = RenderAction
renders = map (>>> manipulationAction >>> render') renderables
manipulationAction = createManipulationAction manipulation
- actionFunction' = \_ -> do
+ actionFunction' _ = do
contexts <- mapM runRenderAction renders
return $ concatMap (fromMaybe "" . M.lookup "body") contexts
diff --git a/src/Text/Hakyll/RenderAction.hs b/src/Text/Hakyll/RenderAction.hs
index 26fa445..28c8e09 100644
--- a/src/Text/Hakyll/RenderAction.hs
+++ b/src/Text/Hakyll/RenderAction.hs
@@ -28,7 +28,7 @@ createRenderAction f = RenderAction
}
createSimpleRenderAction :: Hakyll b -> RenderAction () b
-createSimpleRenderAction x = createRenderAction (const x)
+createSimpleRenderAction = createRenderAction . const
instance Category RenderAction where
id = RenderAction
@@ -44,8 +44,7 @@ instance Category RenderAction where
}
createManipulationAction :: ContextManipulation -> RenderAction Context Context
-createManipulationAction manipulation =
- createRenderAction (return . manipulation)
+createManipulationAction = createRenderAction . (return .)
chain :: [RenderAction a a] -> RenderAction a a
chain = foldl1 (>>>)
diff --git a/src/Text/Hakyll/Renderables.hs b/src/Text/Hakyll/Renderables.hs
index 37bd521..b540d4b 100644
--- a/src/Text/Hakyll/Renderables.hs
+++ b/src/Text/Hakyll/Renderables.hs
@@ -40,7 +40,7 @@ createCustomPage url dependencies association = RenderAction
where
mtuple (a, b) = b >>= \b' -> return (a, b')
toHakyllString = second (either return runRenderAction)
- assoc' = mapM (mtuple . toHakyllString) association
+ assoc' = mapM (mtuple . toHakyllString) $ ("url", Left url) : association
-- | A @createCustomPage@ function specialized in creating listings.
--
@@ -110,7 +110,7 @@ combine x y = RenderAction
{ actionDependencies = actionDependencies x ++ actionDependencies y
, actionUrl = actionUrl x `mplus` actionUrl y
, actionFunction = \_ ->
- liftM2 (M.union) (runRenderAction x) (runRenderAction y)
+ liftM2 M.union (runRenderAction x) (runRenderAction y)
}
-- | Combine two renderables and set a custom URL. This behaves like @combine@,
@@ -122,7 +122,7 @@ combineWithUrl :: FilePath
combineWithUrl url x y = combine'
{ actionUrl = Just $ return url
, actionFunction = \_ ->
- (M.insert "url" url) <$> runRenderAction combine'
+ M.insert "url" url <$> runRenderAction combine'
}
where
combine' = combine x y