@@ -14,7 +14,7 @@ module Hakyll.Commands
15--------------------------------------------------------------------------------
15--------------------------------------------------------------------------------
16import System.Exit (exitWith, ExitCode)
16import System.Exit (exitWith, ExitCode)
17−
17+import Control.Applicative
19--------------------------------------------------------------------------------
19--------------------------------------------------------------------------------
20import qualified Hakyll.Check as Check
20import qualified Hakyll.Check as Check
@@ -34,10 +34,8 @@ import Hakyll.Preview.Server
35--------------------------------------------------------------------------------
35--------------------------------------------------------------------------------
36-- | Build the site
36-- | Build the site
37−build :: Configuration -> Verbosity -> Rules a -> IO (ExitCode)
37+build :: Configuration -> Verbosity -> Rules a -> IO ExitCode
38−build conf verbosity rules = do
38+build conf verbosity rules = fst <$> run conf verbosity rules
39− (ec, _) <- run conf verbosity rules
42--------------------------------------------------------------------------------
40--------------------------------------------------------------------------------
43-- | Run the checker and exit
41-- | Run the checker and exit
@@ -76,7 +74,7 @@ preview _ _ _ _ = previewServerDisabled
77--------------------------------------------------------------------------------
75--------------------------------------------------------------------------------
78-- | Rebuild the site
76-- | Rebuild the site
79−rebuild :: Configuration -> Verbosity -> Rules a -> IO (ExitCode)
77+rebuild :: Configuration -> Verbosity -> Rules a -> IO ExitCode
80rebuild conf verbosity rules =
78rebuild conf verbosity rules =
81 clean conf >> build conf verbosity rules
79 clean conf >> build conf verbosity rules