summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
authorEvan Cofsky <evan@tunixman.com>2013-05-21 09:01:00 -0700
committerEvan Cofsky <evan@tunixman.com>2013-05-21 09:01:00 -0700
commit8c73820abcd91ece6fac001bdec3aa341d90f6bf (patch)
treeddab5348a653c6ea4ff31f348b73e8c92b613e80 /src/Hakyll
parentc236cda401d401bf5b42d3546ee2f117d5729219 (diff)
downloadhakyll-8c73820abcd91ece6fac001bdec3aa341d90f6bf.tar.gz
Clean up type declarations, use fst and <$>.
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Commands.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Hakyll/Commands.hs b/src/Hakyll/Commands.hs
index 1df1d56..7e4ba1c 100644
--- a/src/Hakyll/Commands.hs
+++ b/src/Hakyll/Commands.hs
@@ -14,7 +14,7 @@ module Hakyll.Commands
--------------------------------------------------------------------------------
import System.Exit (exitWith, ExitCode)
-
+import Control.Applicative
--------------------------------------------------------------------------------
import qualified Hakyll.Check as Check
@@ -34,10 +34,8 @@ import Hakyll.Preview.Server
--------------------------------------------------------------------------------
-- | Build the site
-build :: Configuration -> Verbosity -> Rules a -> IO (ExitCode)
-build conf verbosity rules = do
- (ec, _) <- run conf verbosity rules
- return ec
+build :: Configuration -> Verbosity -> Rules a -> IO ExitCode
+build conf verbosity rules = fst <$> run conf verbosity rules
--------------------------------------------------------------------------------
-- | Run the checker and exit
@@ -76,7 +74,7 @@ preview _ _ _ _ = previewServerDisabled
--------------------------------------------------------------------------------
-- | Rebuild the site
-rebuild :: Configuration -> Verbosity -> Rules a -> IO (ExitCode)
+rebuild :: Configuration -> Verbosity -> Rules a -> IO ExitCode
rebuild conf verbosity rules =
clean conf >> build conf verbosity rules