summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r--src/Hakyll/Core/Configuration.hs10
-rw-r--r--src/Hakyll/Core/Runtime.hs8
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