diff options
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r-- | src/Hakyll/Core/Compiler.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Compiler/Internal.hs | 6 | ||||
-rw-r--r-- | src/Hakyll/Core/Compiler/Require.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Dependencies.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/File.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Identifier.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Identifier/Pattern.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Item.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Logger.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Provider/Internal.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Provider/Metadata.hs | 5 | ||||
-rw-r--r-- | src/Hakyll/Core/Rules.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Rules/Internal.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Runtime.hs | 6 | ||||
-rw-r--r-- | src/Hakyll/Core/Store.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/UnixFilter.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Util/File.hs | 1 | ||||
-rw-r--r-- | src/Hakyll/Core/Util/Parser.hs | 2 |
18 files changed, 6 insertions, 32 deletions
diff --git a/src/Hakyll/Core/Compiler.hs b/src/Hakyll/Core/Compiler.hs index f99f93b..ae9fbf1 100644 --- a/src/Hakyll/Core/Compiler.hs +++ b/src/Hakyll/Core/Compiler.hs @@ -28,7 +28,6 @@ module Hakyll.Core.Compiler -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) import Control.Monad (when) import Data.Binary (Binary) import Data.ByteString.Lazy (ByteString) diff --git a/src/Hakyll/Core/Compiler/Internal.hs b/src/Hakyll/Core/Compiler/Internal.hs index 61fb640..7b1df83 100644 --- a/src/Hakyll/Core/Compiler/Internal.hs +++ b/src/Hakyll/Core/Compiler/Internal.hs @@ -28,12 +28,10 @@ module Hakyll.Core.Compiler.Internal -------------------------------------------------------------------------------- -import Control.Applicative (Alternative (..), - Applicative (..), (<$>)) +import Control.Applicative (Alternative (..)) import Control.Exception (SomeException, handle) import Control.Monad (forM_) -import Control.Monad.Error (MonadError (..)) -import Data.Monoid (Monoid (..)) +import Control.Monad.Except (MonadError (..)) import Data.Set (Set) import qualified Data.Set as S diff --git a/src/Hakyll/Core/Compiler/Require.hs b/src/Hakyll/Core/Compiler/Require.hs index d7635a9..c9373bf 100644 --- a/src/Hakyll/Core/Compiler/Require.hs +++ b/src/Hakyll/Core/Compiler/Require.hs @@ -13,7 +13,6 @@ module Hakyll.Core.Compiler.Require -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) import Control.Monad (when) import Data.Binary (Binary) import qualified Data.Set as S diff --git a/src/Hakyll/Core/Dependencies.hs b/src/Hakyll/Core/Dependencies.hs index ebb6fd0..4a51b9c 100644 --- a/src/Hakyll/Core/Dependencies.hs +++ b/src/Hakyll/Core/Dependencies.hs @@ -8,7 +8,6 @@ module Hakyll.Core.Dependencies -------------------------------------------------------------------------------- -import Control.Applicative ((<$>), (<*>)) import Control.Monad (foldM, forM_, unless, when) import Control.Monad.Reader (ask) import Control.Monad.RWS (RWS, runRWS) diff --git a/src/Hakyll/Core/File.hs b/src/Hakyll/Core/File.hs index 26724e1..1c3a9df 100644 --- a/src/Hakyll/Core/File.hs +++ b/src/Hakyll/Core/File.hs @@ -11,7 +11,6 @@ module Hakyll.Core.File -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) import Data.Binary (Binary (..)) import Data.Typeable (Typeable) import System.Directory (copyFile, doesFileExist, diff --git a/src/Hakyll/Core/Identifier.hs b/src/Hakyll/Core/Identifier.hs index 7ac06d8..777811c 100644 --- a/src/Hakyll/Core/Identifier.hs +++ b/src/Hakyll/Core/Identifier.hs @@ -19,7 +19,6 @@ module Hakyll.Core.Identifier -------------------------------------------------------------------------------- -import Control.Applicative ((<$>), (<*>)) import Control.DeepSeq (NFData (..)) import Data.List (intercalate) import System.FilePath (dropTrailingPathSeparator, splitPath) diff --git a/src/Hakyll/Core/Identifier/Pattern.hs b/src/Hakyll/Core/Identifier/Pattern.hs index 92d7705..47ad21b 100644 --- a/src/Hakyll/Core/Identifier/Pattern.hs +++ b/src/Hakyll/Core/Identifier/Pattern.hs @@ -57,13 +57,11 @@ module Hakyll.Core.Identifier.Pattern -------------------------------------------------------------------------------- -import Control.Applicative (pure, (<$>), (<*>)) import Control.Arrow ((&&&), (>>>)) import Control.Monad (msum) import Data.Binary (Binary (..), getWord8, putWord8) import Data.List (inits, isPrefixOf, tails) import Data.Maybe (isJust) -import Data.Monoid (Monoid, mappend, mempty) import Data.Set (Set) import qualified Data.Set as S diff --git a/src/Hakyll/Core/Item.hs b/src/Hakyll/Core/Item.hs index 840b6a8..e05df42 100644 --- a/src/Hakyll/Core/Item.hs +++ b/src/Hakyll/Core/Item.hs @@ -10,10 +10,8 @@ module Hakyll.Core.Item -------------------------------------------------------------------------------- -import Control.Applicative ((<$>), (<*>)) import Data.Binary (Binary (..)) import Data.Foldable (Foldable (..)) -import Data.Traversable (Traversable (..)) import Data.Typeable (Typeable) import Prelude hiding (foldr) diff --git a/src/Hakyll/Core/Logger.hs b/src/Hakyll/Core/Logger.hs index 4731c20..6f950a6 100644 --- a/src/Hakyll/Core/Logger.hs +++ b/src/Hakyll/Core/Logger.hs @@ -13,7 +13,6 @@ module Hakyll.Core.Logger -------------------------------------------------------------------------------- -import Control.Applicative (pure, (<$>), (<*>)) import Control.Concurrent (forkIO) import Control.Concurrent.Chan (Chan, newChan, readChan, writeChan) import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar) diff --git a/src/Hakyll/Core/Provider/Internal.hs b/src/Hakyll/Core/Provider/Internal.hs index 34400fd..c298653 100644 --- a/src/Hakyll/Core/Provider/Internal.hs +++ b/src/Hakyll/Core/Provider/Internal.hs @@ -20,7 +20,6 @@ module Hakyll.Core.Provider.Internal -------------------------------------------------------------------------------- -import Control.Applicative ((<$>), (<*>)) import Control.DeepSeq (NFData (..), deepseq) import Control.Monad (forM) import Data.Binary (Binary (..)) @@ -28,7 +27,6 @@ import qualified Data.ByteString.Lazy as BL import Data.Map (Map) import qualified Data.Map as M import Data.Maybe (fromMaybe) -import Data.Monoid (mempty) import Data.Set (Set) import qualified Data.Set as S import Data.Time (Day (..), UTCTime (..)) diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs index ca1cc6c..0b0291c 100644 --- a/src/Hakyll/Core/Provider/Metadata.hs +++ b/src/Hakyll/Core/Provider/Metadata.hs @@ -11,13 +11,10 @@ module Hakyll.Core.Provider.Metadata -------------------------------------------------------------------------------- -import Control.Applicative import Control.Arrow (second) import Control.Exception (Exception, throwIO) import Control.Monad (guard) import qualified Data.ByteString.Char8 as BC -import qualified Data.HashMap.Strict as HMS -import Data.List (intercalate) import Data.List.Extended (breakWhen) import qualified Data.Map as M import Data.Maybe (fromMaybe) @@ -28,8 +25,6 @@ import qualified Data.Yaml as Yaml import Hakyll.Core.Identifier import Hakyll.Core.Metadata import Hakyll.Core.Provider.Internal -import Hakyll.Core.Util.Parser -import Hakyll.Core.Util.String import System.IO as IO diff --git a/src/Hakyll/Core/Rules.hs b/src/Hakyll/Core/Rules.hs index 14befde..41b9a73 100644 --- a/src/Hakyll/Core/Rules.hs +++ b/src/Hakyll/Core/Rules.hs @@ -33,13 +33,11 @@ module Hakyll.Core.Rules -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) import Control.Monad.Reader (ask, local) import Control.Monad.State (get, modify, put) import Control.Monad.Trans (liftIO) import Control.Monad.Writer (censor, tell) import Data.Maybe (fromMaybe) -import Data.Monoid (mempty) import qualified Data.Set as S diff --git a/src/Hakyll/Core/Rules/Internal.hs b/src/Hakyll/Core/Rules/Internal.hs index a7c2059..0641dcf 100644 --- a/src/Hakyll/Core/Rules/Internal.hs +++ b/src/Hakyll/Core/Rules/Internal.hs @@ -12,12 +12,10 @@ module Hakyll.Core.Rules.Internal -------------------------------------------------------------------------------- -import Control.Applicative (Applicative, (<$>)) import Control.Monad.Reader (ask) import Control.Monad.RWS (RWST, runRWST) import Control.Monad.Trans (liftIO) import qualified Data.Map as M -import Data.Monoid (Monoid, mappend, mempty) import Data.Set (Set) diff --git a/src/Hakyll/Core/Runtime.hs b/src/Hakyll/Core/Runtime.hs index bdcd66c..16a5d9e 100644 --- a/src/Hakyll/Core/Runtime.hs +++ b/src/Hakyll/Core/Runtime.hs @@ -6,7 +6,7 @@ module Hakyll.Core.Runtime -------------------------------------------------------------------------------- import Control.Monad (unless) -import Control.Monad.Error (ErrorT, runErrorT, throwError) +import Control.Monad.Except (ExceptT, runExceptT, throwError) import Control.Monad.Reader (ask) import Control.Monad.RWS (RWST, runRWST) import Control.Monad.State (get, modify) @@ -75,7 +75,7 @@ run config logger rules = do } -- Run the program and fetch the resulting state - result <- runErrorT $ runRWST build read' state + result <- runExceptT $ runRWST build read' state case result of Left e -> do Logger.error logger e @@ -115,7 +115,7 @@ data RuntimeState = RuntimeState -------------------------------------------------------------------------------- -type Runtime a = RWST RuntimeRead () RuntimeState (ErrorT String IO) a +type Runtime a = RWST RuntimeRead () RuntimeState (ExceptT String IO) a -------------------------------------------------------------------------------- diff --git a/src/Hakyll/Core/Store.hs b/src/Hakyll/Core/Store.hs index 5c3667d..fdbcf11 100644 --- a/src/Hakyll/Core/Store.hs +++ b/src/Hakyll/Core/Store.hs @@ -16,7 +16,6 @@ module Hakyll.Core.Store -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) import Control.Exception (IOException, handle) import qualified Crypto.Hash.MD5 as MD5 import Data.Binary (Binary, decode, encodeFile) diff --git a/src/Hakyll/Core/UnixFilter.hs b/src/Hakyll/Core/UnixFilter.hs index 0f88c77..734d8d8 100644 --- a/src/Hakyll/Core/UnixFilter.hs +++ b/src/Hakyll/Core/UnixFilter.hs @@ -16,7 +16,6 @@ import Control.Monad (forM_) import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as LB import Data.IORef (newIORef, readIORef, writeIORef) -import Data.Monoid (Monoid, mempty) import System.Exit (ExitCode (..)) import System.IO (Handle, hClose, hFlush, hGetContents, hPutStr, hSetEncoding, localeEncoding) diff --git a/src/Hakyll/Core/Util/File.hs b/src/Hakyll/Core/Util/File.hs index b20576f..9db6b11 100644 --- a/src/Hakyll/Core/Util/File.hs +++ b/src/Hakyll/Core/Util/File.hs @@ -8,7 +8,6 @@ module Hakyll.Core.Util.File -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) import Control.Monad (filterM, forM, when) import System.Directory (createDirectoryIfMissing, doesDirectoryExist, getDirectoryContents, diff --git a/src/Hakyll/Core/Util/Parser.hs b/src/Hakyll/Core/Util/Parser.hs index c5789ed..e958b76 100644 --- a/src/Hakyll/Core/Util/Parser.hs +++ b/src/Hakyll/Core/Util/Parser.hs @@ -7,7 +7,7 @@ module Hakyll.Core.Util.Parser -------------------------------------------------------------------------------- -import Control.Applicative ((<$>), (<*>), (<|>)) +import Control.Applicative ((<|>)) import Control.Monad (mzero) import qualified Text.Parsec as P import Text.Parsec.String (Parser) |