on master help sign in
Relax Rules to RulesM a in most places
commit6bb94ac3fa652da5c479f262b92d3f54d4f2cc79 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateSun 29 May 2011, 12:30 (15 years ago) parentcd0228a
3 files changed+7−7
src/Hakyll/Core/Rules/Internal.hs+1−1 src/Hakyll/Core/Run.hs+1−1 src/Hakyll/Main.hs+5−5
src/Hakyll/Core/Rules/Internal.hs+1−1
@@ -80,7 +80,7 @@ type Rules = RulesM ()
8080
8181-- | Run a Rules monad, resulting in a 'RuleSet'
8282--
83−runRules :: Rules -> ResourceProvider -> RuleSet
83+runRules :: RulesM a -> ResourceProvider -> RuleSet
8484runRules rules provider = nubCompilers $
8585 evalState (execWriterT $ runReaderT (unRulesM rules) env) state
8686 where
src/Hakyll/Core/Run.hs+1−1
@@ -35,7 +35,7 @@ import Hakyll.Core.Logger
3535
3636-- | Run all rules needed, return the rule set used
3737--
38−run :: HakyllConfiguration -> Rules -> IO RuleSet
38+run :: HakyllConfiguration -> RulesM a -> IO RuleSet
3939run configuration rules = do
4040 logger <- makeLogger putStrLn
4141
src/Hakyll/Main.hs+5−5
@@ -22,13 +22,13 @@ import Hakyll.Web.Preview.Server
2222
2323-- | This usualy is the function with which the user runs the hakyll compiler
2424--
25−hakyll :: Rules -> IO ()
25+hakyll :: RulesM a -> IO ()
2626hakyll = hakyllWith defaultHakyllConfiguration
2727
2828-- | A variant of 'hakyll' which allows the user to specify a custom
2929-- configuration
3030--
31−hakyllWith :: HakyllConfiguration -> Rules -> IO ()
31+hakyllWith :: HakyllConfiguration -> RulesM a -> IO ()
3232hakyllWith conf rules = do
3333 args <- getArgs
3434 case args of
@@ -44,7 +44,7 @@ hakyllWith conf rules = do
4444
4545-- | Build the site
4646--
47−build :: HakyllConfiguration -> Rules -> IO ()
47+build :: HakyllConfiguration -> RulesM a -> IO ()
4848build conf rules = do
4949 _ <- run conf rules
5050 return ()
@@ -84,7 +84,7 @@ help = do
8484
8585-- | Preview the site
8686--
87−preview :: HakyllConfiguration -> Rules -> Int -> IO ()
87+preview :: HakyllConfiguration -> RulesM a -> Int -> IO ()
8888preview conf rules port = do
8989 -- Fork a thread polling for changes
9090 _ <- forkIO $ previewPoll conf update
@@ -96,7 +96,7 @@ preview conf rules port = do
9696
9797-- | Rebuild the site
9898--
99−rebuild :: HakyllConfiguration -> Rules -> IO ()
99+rebuild :: HakyllConfiguration -> RulesM a -> IO ()
100100rebuild conf rules = do
101101 clean conf
102102 build conf rules