on master help sign in
More explicit imports.
b6c8198Jasper Van der Jeugt
src/Network/Hakyll/SimpleServer.hs+1−1
@@ -170,7 +170,7 @@ simpleServer port = do
170 , portNumber = port
170 , portNumber = port
171 }
171 }
172
172
173− -- When a clien connects, respond in a separate thread.
173+ -- When a client connects, respond in a separate thread.
174 listen socket = do (handle, _, _) <- accept socket
174 listen socket = do (handle, _, _) <- accept socket
175 forkIO (runReaderT (respond handle) config)
175 forkIO (runReaderT (respond handle) config)
176 return ()
176 return ()
src/Text/Hakyll/CompressCSS.hs+2−2
@@ -2,8 +2,8 @@ module Text.Hakyll.CompressCSS
2 ( compressCSS
2 ( compressCSS
3 ) where
3 ) where
4
4
5−import Data.List
5+import Data.List (isPrefixOf)
6−import Text.Regex
6+import Text.Regex (subRegex, mkRegex)
7
7
8-- | subRegex with arguments flipped for easy function composition.
8-- | subRegex with arguments flipped for easy function composition.
9subRegex' :: String -> String -> String -> String
9subRegex' :: String -> String -> String -> String
src/Text/Hakyll/File.hs+7−7
@@ -1,13 +1,13 @@
1-- | A module containing various function for manipulating and examinating
1-- | A module containing various function for manipulating and examinating
2-- files and directories.
2-- files and directories.
3module Text.Hakyll.File
3module Text.Hakyll.File
4− ( toDestination,
4+ ( toDestination
5− toCache,
5+ , toCache
6− toURL,
6+ , toURL
7− makeDirectories,
7+ , makeDirectories
8− getRecursiveContents,
8+ , getRecursiveContents
9− isCacheValid,
9+ , isCacheValid
10− directory
10+ , directory
11 ) where
11 ) where
12
12
13import System.Directory
13import System.Directory
src/Text/Hakyll/Page.hs+7−7
@@ -1,11 +1,11 @@
1module Text.Hakyll.Page
1module Text.Hakyll.Page
2− ( Page,
2+ ( Page
3− fromContext,
3+ , fromContext
4− getValue,
4+ , getValue
5− copyValueWith,
5+ , copyValueWith
6− getBody,
6+ , getBody
7− readPage,
7+ , readPage
8− writePage
8+ , writePage
9 ) where
9 ) where
10
10
11import qualified Data.Map as M
11import qualified Data.Map as M
src/Text/Hakyll/Render.hs+8−8
@@ -1,18 +1,18 @@
1module Text.Hakyll.Render
1module Text.Hakyll.Render
2− ( depends,
2+ ( depends
3− render,
3+ , render
4− renderAndConcat,
4+ , renderAndConcat
5− renderChain,
5+ , renderChain
6− static,
6+ , static
7− css
7+ , css
8 ) where
8 ) where
9
9
10import Text.Template hiding (render)
10import Text.Template hiding (render)
11import qualified Data.ByteString.Lazy.Char8 as B
11import qualified Data.ByteString.Lazy.Char8 as B
12import qualified Data.Map as M
12import qualified Data.Map as M
13−import Control.Monad
13+import Control.Monad (unless, liftM, foldM)
14
14
15−import System.Directory
15+import System.Directory (copyFile)
16import System.IO
16import System.IO
17
17
18import Text.Hakyll.Page
18import Text.Hakyll.Page
src/Text/Hakyll/Renderable.hs+2−2
@@ -2,8 +2,8 @@ module Text.Hakyll.Renderable
2 ( Renderable(toContext, getDependencies, getURL)
2 ( Renderable(toContext, getDependencies, getURL)
3 ) where
3 ) where
4
4
5−import System.FilePath
5+import System.FilePath (FilePath)
6−import Text.Template
6+import Text.Template (Context)
7
7
8-- | A class for datatypes that can be rendered to pages.
8-- | A class for datatypes that can be rendered to pages.
9class Renderable a where
9class Renderable a where
src/Text/Hakyll/Renderables.hs+5−6
@@ -1,14 +1,13 @@
1module Text.Hakyll.Renderables
1module Text.Hakyll.Renderables
2− ( CustomPage,
2+ ( CustomPage
3− createCustomPage,
3+ , createCustomPage
4− PagePath,
4+ , PagePath
5− createPagePath
5+ , createPagePath
6 ) where
6 ) where
7
7
8−import System.FilePath
8+import System.FilePath (FilePath)
9import qualified Data.ByteString.Lazy.Char8 as B
9import qualified Data.ByteString.Lazy.Char8 as B
10import qualified Data.Map as M
10import qualified Data.Map as M
11−import Control.Monad
12import Text.Hakyll.Page
11import Text.Hakyll.Page
13import Text.Hakyll.Renderable
12import Text.Hakyll.Renderable
14import Text.Hakyll.File
13import Text.Hakyll.File
src/Text/Hakyll/Tags.hs+2−2
@@ -7,11 +7,11 @@ module Text.Hakyll.Tags
7import qualified Data.Map as M
7import qualified Data.Map as M
8import qualified Data.ByteString.Lazy.Char8 as B
8import qualified Data.ByteString.Lazy.Char8 as B
9import qualified Data.List as L
9import qualified Data.List as L
10−import Control.Monad
10+import Control.Monad (foldM)
11
11
12import Text.Hakyll.Util
12import Text.Hakyll.Util
13import Text.Hakyll.Page
13import Text.Hakyll.Page
14−import Control.Arrow
14+import Control.Arrow (second)
15
15
16-- | Read a tag map. This creates a map from tags to page paths. This function
16-- | Read a tag map. This creates a map from tags to page paths. This function
17-- assumes the tags are located in the `tags` metadata field, separated by
17-- assumes the tags are located in the `tags` metadata field, separated by
src/Text/Hakyll/Util.hs+5−6
@@ -1,12 +1,11 @@
1module Text.Hakyll.Util
1module Text.Hakyll.Util
2− ( trim,
2+ ( trim
3− split,
3+ , split
4− stripHTML
4+ , stripHTML
5 ) where
5 ) where
6
6
7−import Data.Char
7+import Data.Char (isSpace)
8−import Data.List
9−import Text.Regex
8+import Text.Regex (splitRegex, mkRegex)
10
9
11-- | Trim a string (drop spaces and tabs at both sides).
10-- | Trim a string (drop spaces and tabs at both sides).
12trim :: String -> String
11trim :: String -> String