on master help sign in
Clean up type declarations, use fst and <$>.
8c73820Evan Cofsky
src/Hakyll/Commands.hs+4−6
@@ -14,7 +14,7 @@ module Hakyll.Commands
14
14
15--------------------------------------------------------------------------------
15--------------------------------------------------------------------------------
16import System.Exit (exitWith, ExitCode)
16import System.Exit (exitWith, ExitCode)
17−
17+import Control.Applicative
18
18
19--------------------------------------------------------------------------------
19--------------------------------------------------------------------------------
20import qualified Hakyll.Check as Check
20import qualified Hakyll.Check as Check
@@ -34,10 +34,8 @@ import Hakyll.Preview.Server
34
34
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
40− return ec
41
39
42--------------------------------------------------------------------------------
40--------------------------------------------------------------------------------
43-- | Run the checker and exit
41-- | Run the checker and exit
@@ -76,7 +74,7 @@ preview _ _ _ _ = previewServerDisabled
76
74
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
82
80