diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-31 15:16:14 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-12-31 15:16:14 +0100 |
commit | 24273d034850b1312c551f6ace7f0b549728cbc9 (patch) | |
tree | c17c96c372a9605fb5081311d7a6d93de4135649 /src/Hakyll/Core | |
parent | ed03544e1b58710448fa67764f10554b8eeab8dc (diff) | |
download | hakyll-24273d034850b1312c551f6ace7f0b549728cbc9.tar.gz |
Remove verbosity from configuration
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r-- | src/Hakyll/Core/Configuration.hs | 10 | ||||
-rw-r--r-- | src/Hakyll/Core/Runtime.hs | 8 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/Hakyll/Core/Configuration.hs b/src/Hakyll/Core/Configuration.hs index c45d1a3..86898dc 100644 --- a/src/Hakyll/Core/Configuration.hs +++ b/src/Hakyll/Core/Configuration.hs @@ -1,8 +1,7 @@ -------------------------------------------------------------------------------- -- | Exports a datastructure for the top-level hakyll configuration module Hakyll.Core.Configuration - ( Verbosity (..) - , Configuration (..) + ( Configuration (..) , shouldIgnoreFile , defaultConfiguration ) where @@ -14,10 +13,6 @@ import System.FilePath (normalise, takeFileName) -------------------------------------------------------------------------------- -import Hakyll.Core.Logger - - --------------------------------------------------------------------------------- data Configuration = Configuration { -- | Directory in which the output written destinationDirectory :: FilePath @@ -57,8 +52,6 @@ data Configuration = Configuration , -- | Use an in-memory cache for items. This is faster but uses more -- memory. inMemoryCache :: Bool - -- | Verbosity for the logger. Can be overwritten by the command-line. - , verbosity :: Verbosity } @@ -72,7 +65,6 @@ defaultConfiguration = Configuration , ignoreFile = ignoreFile' , deployCommand = "echo 'No deploy command specified'" , inMemoryCache = True - , verbosity = Message } where ignoreFile' path diff --git a/src/Hakyll/Core/Runtime.hs b/src/Hakyll/Core/Runtime.hs index 7e4a835..e052f37 100644 --- a/src/Hakyll/Core/Runtime.hs +++ b/src/Hakyll/Core/Runtime.hs @@ -28,7 +28,7 @@ import Hakyll.Core.Configuration import Hakyll.Core.Dependencies import Hakyll.Core.Identifier import Hakyll.Core.Item.SomeItem -import Hakyll.Core.Logger (Logger) +import Hakyll.Core.Logger (Logger, Verbosity) import qualified Hakyll.Core.Logger as Logger import Hakyll.Core.Provider import Hakyll.Core.Routes @@ -41,10 +41,10 @@ import Hakyll.Core.Writable -------------------------------------------------------------------------------- -- | TODO Make this return exit code? -run :: Configuration -> Rules a -> IO RuleSet -run config rules = do +run :: Configuration -> Verbosity -> Rules a -> IO RuleSet +run config verbosity rules = do -- Initialization - logger <- Logger.new (verbosity config) + logger <- Logger.new verbosity Logger.header logger "Initialising..." Logger.message logger "Creating store..." store <- Store.new (inMemoryCache config) $ storeDirectory config |