From 715387756e57b539e29d036515e047cdf5d264ba Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 19 Jan 2010 20:42:16 +0100 Subject: Made hakyll function backward-compatible. Version bump. --- src/Text/Hakyll.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Hakyll.hs b/src/Text/Hakyll.hs index 5c2fbd5..c0486e7 100644 --- a/src/Text/Hakyll.hs +++ b/src/Text/Hakyll.hs @@ -1,6 +1,7 @@ module Text.Hakyll ( defaultHakyllConfiguration , hakyll + , hakyllWithConfiguration ) where import Control.Monad.Reader (runReaderT) @@ -18,9 +19,13 @@ defaultHakyllConfiguration = HakyllConfiguration { additionalContext = M.empty } --- | Main function to run hakyll. -hakyll :: HakyllConfiguration -> Hakyll () -> IO () -hakyll configuration buildFunction = do +-- | Hakyll with a default configuration. +hakyll :: Hakyll () -> IO () +hakyll = hakyllWithConfiguration defaultHakyllConfiguration + +-- | Main function to run hakyll with a configuration. +hakyllWithConfiguration :: HakyllConfiguration -> Hakyll () -> IO () +hakyllWithConfiguration configuration buildFunction = do args <- getArgs case args of ["build"] -> build' ["clean"] -> clean -- cgit v1.2.3