summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Hakyll/Check.hs1
-rw-r--r--lib/Hakyll/Commands.hs4
-rw-r--r--lib/Hakyll/Web/Pandoc.hs14
3 files changed, 8 insertions, 11 deletions
diff --git a/lib/Hakyll/Check.hs b/lib/Hakyll/Check.hs
index da77bac..f001cbe 100644
--- a/lib/Hakyll/Check.hs
+++ b/lib/Hakyll/Check.hs
@@ -17,7 +17,6 @@ import Control.Monad.Reader (ReaderT, ask, runReaderT)
import Control.Monad.State (StateT, get, modify, runStateT)
import Control.Monad.Trans (liftIO)
import Control.Monad.Trans.Resource (runResourceT)
-import Data.ByteString.Char8 (unpack)
import Data.List (isPrefixOf)
import qualified Data.Map.Lazy as Map
import Network.URI (unEscapeString)
diff --git a/lib/Hakyll/Commands.hs b/lib/Hakyll/Commands.hs
index 667f07a..84d1c56 100644
--- a/lib/Hakyll/Commands.hs
+++ b/lib/Hakyll/Commands.hs
@@ -16,7 +16,8 @@ module Hakyll.Commands
--------------------------------------------------------------------------------
import Control.Concurrent
-import System.Exit (ExitCode, exitWith)
+import System.Exit (ExitCode)
+
--------------------------------------------------------------------------------
import Hakyll.Check (Check(..))
@@ -29,6 +30,7 @@ import Hakyll.Core.Rules.Internal
import Hakyll.Core.Runtime
import Hakyll.Core.Util.File
+
--------------------------------------------------------------------------------
#ifdef WATCH_SERVER
import Hakyll.Preview.Poll (watchUpdates)
diff --git a/lib/Hakyll/Web/Pandoc.hs b/lib/Hakyll/Web/Pandoc.hs
index 6dcae32..5f04de4 100644
--- a/lib/Hakyll/Web/Pandoc.hs
+++ b/lib/Hakyll/Web/Pandoc.hs
@@ -22,11 +22,9 @@ module Hakyll.Web.Pandoc
--------------------------------------------------------------------------------
-import qualified Data.Set as S
+import qualified Data.Text as T
import Text.Pandoc
-import Text.Pandoc.Error (PandocError (..))
import Text.Pandoc.Highlighting (pygments)
-import qualified Data.Text as T
--------------------------------------------------------------------------------
@@ -51,11 +49,9 @@ readPandocWith
-> Compiler (Item Pandoc) -- ^ Resulting document
readPandocWith ropt item =
case runPure $ traverse (reader ropt (itemFileType item)) (fmap T.pack item) of
- Left (PandocParseError err) -> fail $
- "Hakyll.Web.Pandoc.readPandocWith: parse failed: " ++ err
- Left (PandocParsecError _ err) -> fail $
+ Left err -> fail $
"Hakyll.Web.Pandoc.readPandocWith: parse failed: " ++ show err
- Right item' -> return item'
+ Right item' -> return item'
where
reader ro t = case t of
DocBook -> readDocBook ro
@@ -88,8 +84,8 @@ writePandocWith :: WriterOptions -- ^ Writer options for pandoc
-> Item String -- ^ Resulting HTML
writePandocWith wopt (Item itemi doc) =
case runPure $ writeHtml5String wopt doc of
- Left (PandocSomeError err) -> error $ "Hakyll.Web.Pandoc.writePandocWith: unknown error: " ++ err
- Right item' -> Item itemi $ T.unpack item'
+ Left err -> error $ "Hakyll.Web.Pandoc.writePandocWith: " ++ show err
+ Right item' -> Item itemi $ T.unpack item'
--------------------------------------------------------------------------------