aboutsummaryrefslogtreecommitdiff
path: root/benchmark/weigh-pandoc.hs
diff options
context:
space:
mode:
authorschrieveslaach <schrieveslaach@online.de>2017-06-12 15:52:29 +0200
committerGitHub <noreply@github.com>2017-06-12 15:52:29 +0200
commit635f299b441e238ccd34e3ad61c5e36f0ca30067 (patch)
tree11cfc34402975bad208f9a48d075fe2ace959e70 /benchmark/weigh-pandoc.hs
parent181c56d4003aa83abed23b95a452c4890aa3797c (diff)
parent23f3c2d7b4796d1af742a74999ce67924bf2abb3 (diff)
downloadpandoc-635f299b441e238ccd34e3ad61c5e36f0ca30067.tar.gz
Merge branch 'master' into textcolor-support
Diffstat (limited to 'benchmark/weigh-pandoc.hs')
-rw-r--r--benchmark/weigh-pandoc.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/benchmark/weigh-pandoc.hs b/benchmark/weigh-pandoc.hs
index b4462d747..d3cada8c0 100644
--- a/benchmark/weigh-pandoc.hs
+++ b/benchmark/weigh-pandoc.hs
@@ -1,5 +1,6 @@
import Weigh
import Text.Pandoc
+import Data.Text (Text)
main :: IO ()
main = do
@@ -23,13 +24,13 @@ main = do
,("commonmark", writeCommonMark)
]
-weighWriter :: Pandoc -> String -> (Pandoc -> String) -> Weigh ()
+weighWriter :: Pandoc -> String -> (Pandoc -> Text) -> Weigh ()
weighWriter doc name writer = func (name ++ " writer") writer doc
-weighReader :: Pandoc -> String -> (String -> Pandoc) -> Weigh ()
+weighReader :: Pandoc -> String -> (Text -> Pandoc) -> Weigh ()
weighReader doc name reader = do
case lookup name writers of
- Just (StringWriter writer) ->
+ Just (TextWriter writer) ->
let inp = either (error . show) id $ runPure $ writer def{ writerWrapText = WrapAuto} doc
in func (name ++ " reader") reader inp
_ -> return () -- no writer for reader