summaryrefslogtreecommitdiff
path: root/src/Hakyll/Web
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-12-29 22:59:38 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-12-29 22:59:38 +0100
commit6268e4a4fe961ca810da1ecb2275142a301f0813 (patch)
tree00ac59620a114259d32f8bdd15874ebec15c6f9a /src/Hakyll/Web
parentbf31c55c99496fe20274df73a831fb1db86591e4 (diff)
downloadhakyll-6268e4a4fe961ca810da1ecb2275142a301f0813.tar.gz
Experimental arrow-based approach
Diffstat (limited to 'src/Hakyll/Web')
-rw-r--r--src/Hakyll/Web/FileType.hs8
-rw-r--r--src/Hakyll/Web/Pandoc.hs6
2 files changed, 9 insertions, 5 deletions
diff --git a/src/Hakyll/Web/FileType.hs b/src/Hakyll/Web/FileType.hs
index a958fed..d5a9c56 100644
--- a/src/Hakyll/Web/FileType.hs
+++ b/src/Hakyll/Web/FileType.hs
@@ -7,10 +7,10 @@ module Hakyll.Web.FileType
) where
import System.FilePath (takeExtension)
-import Control.Applicative ((<$>))
+import Control.Arrow ((>>>), arr)
import Hakyll.Core.Identifier
-import Hakyll.Core.Target
+import Hakyll.Core.Compiler
-- | Datatype to represent the different file types Hakyll can deal with by
-- default
@@ -51,5 +51,5 @@ fileType = fileType' . takeExtension
-- | Get the file type for the current file
--
-getFileType :: TargetM FileType
-getFileType = fileType . toFilePath <$> getIdentifier
+getFileType :: Compiler () FileType
+getFileType = getIdentifier >>> arr (fileType . toFilePath)
diff --git a/src/Hakyll/Web/Pandoc.hs b/src/Hakyll/Web/Pandoc.hs
index 17cac81..653c711 100644
--- a/src/Hakyll/Web/Pandoc.hs
+++ b/src/Hakyll/Web/Pandoc.hs
@@ -8,10 +8,12 @@ module Hakyll.Web.Pandoc
, writePandocWith
-- * Functions working on pages/targets
+ {-
, pageReadPandoc
, pageReadPandocWith
, pageRenderPandoc
, pageRenderPandocWith
+ -}
-- * Default options
, defaultParserState
@@ -23,7 +25,7 @@ import Control.Applicative ((<$>))
import Text.Pandoc (Pandoc)
import qualified Text.Pandoc as P
-import Hakyll.Core.Target
+import Hakyll.Core.Compiler
import Hakyll.Web.FileType
import Hakyll.Web.Page
@@ -62,6 +64,7 @@ writePandocWith :: P.WriterOptions -- ^ Writer options for pandoc
-> String -- ^ Resulting HTML
writePandocWith = P.writeHtmlString
+{-
-- | Read the resource using pandoc
--
pageReadPandoc :: Page String -> TargetM (Page Pandoc)
@@ -88,6 +91,7 @@ pageRenderPandocWith :: P.ParserState
pageRenderPandocWith state options page = do
pandoc <- pageReadPandocWith state page
return $ writePandocWith options <$> pandoc
+-}
-- | The default reader options for pandoc parsing in hakyll
--