summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-05-29 12:30:33 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-05-29 12:30:33 +0200
commit6bb94ac3fa652da5c479f262b92d3f54d4f2cc79 (patch)
treea7c92f90a5e293ecf93ea433b83c8afd97b6e179 /src/Hakyll
parentcd0228ac2bb845b25b30095d4b4d9649eac447b2 (diff)
downloadhakyll-6bb94ac3fa652da5c479f262b92d3f54d4f2cc79.tar.gz
Relax Rules to RulesM a in most places
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Core/Rules/Internal.hs2
-rw-r--r--src/Hakyll/Core/Run.hs2
-rw-r--r--src/Hakyll/Main.hs10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Hakyll/Core/Rules/Internal.hs b/src/Hakyll/Core/Rules/Internal.hs
index 5a1ab8e..fd13f7a 100644
--- a/src/Hakyll/Core/Rules/Internal.hs
+++ b/src/Hakyll/Core/Rules/Internal.hs
@@ -80,7 +80,7 @@ type Rules = RulesM ()
-- | Run a Rules monad, resulting in a 'RuleSet'
--
-runRules :: Rules -> ResourceProvider -> RuleSet
+runRules :: RulesM a -> ResourceProvider -> RuleSet
runRules rules provider = nubCompilers $
evalState (execWriterT $ runReaderT (unRulesM rules) env) state
where
diff --git a/src/Hakyll/Core/Run.hs b/src/Hakyll/Core/Run.hs
index 9b27cf3..88cc160 100644
--- a/src/Hakyll/Core/Run.hs
+++ b/src/Hakyll/Core/Run.hs
@@ -35,7 +35,7 @@ import Hakyll.Core.Logger
-- | Run all rules needed, return the rule set used
--
-run :: HakyllConfiguration -> Rules -> IO RuleSet
+run :: HakyllConfiguration -> RulesM a -> IO RuleSet
run configuration rules = do
logger <- makeLogger putStrLn
diff --git a/src/Hakyll/Main.hs b/src/Hakyll/Main.hs
index 49a34ec..2513303 100644
--- a/src/Hakyll/Main.hs
+++ b/src/Hakyll/Main.hs
@@ -22,13 +22,13 @@ import Hakyll.Web.Preview.Server
-- | This usualy is the function with which the user runs the hakyll compiler
--
-hakyll :: Rules -> IO ()
+hakyll :: RulesM a -> IO ()
hakyll = hakyllWith defaultHakyllConfiguration
-- | A variant of 'hakyll' which allows the user to specify a custom
-- configuration
--
-hakyllWith :: HakyllConfiguration -> Rules -> IO ()
+hakyllWith :: HakyllConfiguration -> RulesM a -> IO ()
hakyllWith conf rules = do
args <- getArgs
case args of
@@ -44,7 +44,7 @@ hakyllWith conf rules = do
-- | Build the site
--
-build :: HakyllConfiguration -> Rules -> IO ()
+build :: HakyllConfiguration -> RulesM a -> IO ()
build conf rules = do
_ <- run conf rules
return ()
@@ -84,7 +84,7 @@ help = do
-- | Preview the site
--
-preview :: HakyllConfiguration -> Rules -> Int -> IO ()
+preview :: HakyllConfiguration -> RulesM a -> Int -> IO ()
preview conf rules port = do
-- Fork a thread polling for changes
_ <- forkIO $ previewPoll conf update
@@ -96,7 +96,7 @@ preview conf rules port = do
-- | Rebuild the site
--
-rebuild :: HakyllConfiguration -> Rules -> IO ()
+rebuild :: HakyllConfiguration -> RulesM a -> IO ()
rebuild conf rules = do
clean conf
build conf rules