diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2017-12-18 20:05:28 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2017-12-18 20:05:28 +0100 |
commit | 030864a921d38405778ddeb1286e8922955c8ab4 (patch) | |
tree | 81b65317f3b48dd39f192739dcc39b5adac35c5f /lib/Hakyll/Web | |
parent | 7634b44e4ad9f6a0ba77c377eb1ee43085687789 (diff) | |
download | hakyll-030864a921d38405778ddeb1286e8922955c8ab4.tar.gz |
Fix warnings and errors
Diffstat (limited to 'lib/Hakyll/Web')
-rw-r--r-- | lib/Hakyll/Web/Pandoc.hs | 14 |
1 files changed, 5 insertions, 9 deletions
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' -------------------------------------------------------------------------------- |