summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/FileType.hs6
-rw-r--r--src/Hakyll/Web/Pandoc.hs7
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Hakyll/Web/FileType.hs b/src/Hakyll/Web/FileType.hs
index d5a9c56..cd1188a 100644
--- a/src/Hakyll/Web/FileType.hs
+++ b/src/Hakyll/Web/FileType.hs
@@ -7,7 +7,7 @@ module Hakyll.Web.FileType
) where
import System.FilePath (takeExtension)
-import Control.Arrow ((>>>), arr)
+import Control.Arrow ((>>^))
import Hakyll.Core.Identifier
import Hakyll.Core.Compiler
@@ -51,5 +51,5 @@ fileType = fileType' . takeExtension
-- | Get the file type for the current file
--
-getFileType :: Compiler () FileType
-getFileType = getIdentifier >>> arr (fileType . toFilePath)
+getFileType :: Compiler a FileType
+getFileType = getIdentifier >>^ fileType . toFilePath
diff --git a/src/Hakyll/Web/Pandoc.hs b/src/Hakyll/Web/Pandoc.hs
index c03c6ca..7fecdc4 100644
--- a/src/Hakyll/Web/Pandoc.hs
+++ b/src/Hakyll/Web/Pandoc.hs
@@ -20,14 +20,13 @@ module Hakyll.Web.Pandoc
import Prelude hiding (id)
import Control.Applicative ((<$>))
-import Control.Arrow ((>>>), arr)
+import Control.Arrow ((>>^), (&&&))
import Control.Category (id)
import Text.Pandoc (Pandoc)
import qualified Text.Pandoc as P
import Hakyll.Core.Compiler
-import Hakyll.Core.Util.Arrow
import Hakyll.Web.FileType
import Hakyll.Web.Page
@@ -75,7 +74,7 @@ pageReadPandoc = pageReadPandocWith defaultParserState
--
pageReadPandocWith :: P.ParserState -> Compiler (Page String) (Page Pandoc)
pageReadPandocWith state =
- withUnitArr id getFileType >>> arr pageReadPandocWith'
+ id &&& getFileType >>^ pageReadPandocWith'
where
pageReadPandocWith' (p, t) = readPandocWith state t <$> p
@@ -90,7 +89,7 @@ pageRenderPandocWith :: P.ParserState
-> P.WriterOptions
-> Compiler (Page String) (Page String)
pageRenderPandocWith state options =
- pageReadPandocWith state >>> arr (fmap $ writePandocWith options)
+ pageReadPandocWith state >>^ (fmap $ writePandocWith options)
-- | The default reader options for pandoc parsing in hakyll
--