@@ -23,13 +23,13 @@ import System.Process (system)
2323--------------------------------------------------------------------------------
2424import qualified Hakyll.Check as Check
2525import Hakyll.Core.Configuration
26+import Hakyll.Core.Logger (Verbosity)
2627import Hakyll.Core.Rules
2728import Hakyll.Core.Runtime
2829
2930
3031--------------------------------------------------------------------------------
3132#ifdef PREVIEW_SERVER
32−import Control.Applicative ((<$>))
3333import Control.Concurrent (forkIO)
3434import qualified Data.Set as S
3535import Hakyll.Core.Identifier
@@ -41,16 +41,16 @@ import Hakyll.Preview.Server
4141
4242--------------------------------------------------------------------------------
4343-- | Build the site
44−build :: Configuration -> Rules a -> IO ()
45−build conf rules = do
46− _ <- run conf rules
44+build :: Configuration -> Verbosity -> Rules a -> IO ()
45+build conf verbosity rules = do
46+ _ <- run conf verbosity rules
4747 return ()
4848
4949
5050--------------------------------------------------------------------------------
5151-- | Run the checker and exit
52−check :: Configuration -> IO ()
53−check config = Check.check config >>= exitWith
52+check :: Configuration -> Verbosity -> IO ()
53+check config verbosity = Check.check config verbosity >>= exitWith
5454
5555
5656--------------------------------------------------------------------------------
@@ -68,27 +68,29 @@ clean conf = do
6868
6969--------------------------------------------------------------------------------
7070-- | Preview the site
71−preview :: Configuration -> Rules a -> Int -> IO ()
71+preview :: Configuration -> Verbosity -> Rules a -> Int -> IO ()
7272#ifdef PREVIEW_SERVER
73−preview conf rules port = do
73+preview conf verbosity rules port = do
7474 -- Fork a thread polling for changes
7575 _ <- forkIO $ previewPoll conf update
7676
7777 -- Run the server in the main thread
7878 server conf port
7979 where
80− update = map toFilePath . S.toList . rulesResources <$> run conf rules
80+ update = do
81+ ruleSet <- run conf verbosity rules
82+ return $ map toFilePath $ S.toList $ rulesResources ruleSet
8183#else
82−preview _ _ _ = previewServerDisabled
84+preview _ _ _ _ = previewServerDisabled
8385#endif
8486
8587
8688--------------------------------------------------------------------------------
8789-- | Rebuild the site
88−rebuild :: Configuration -> Rules a -> IO ()
89−rebuild conf rules = do
90+rebuild :: Configuration -> Verbosity -> Rules a -> IO ()
91+rebuild conf verbosity rules = do
9092 clean conf
91− build conf rules
93+ build conf verbosity rules
9294
9395
9496--------------------------------------------------------------------------------