aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/benchmark-pandoc.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/benchmark-pandoc.hs b/benchmark/benchmark-pandoc.hs
index c5646a958..2990bed87 100644
--- a/benchmark/benchmark-pandoc.hs
+++ b/benchmark/benchmark-pandoc.hs
@@ -7,7 +7,7 @@ import System.Environment (getArgs)
import Data.Monoid
readerBench :: Pandoc
- -> (String, ReaderOptions -> String -> Pandoc)
+ -> (String, ReaderOptions -> String -> IO Pandoc)
-> Benchmark
readerBench doc (name, reader) =
let writer = case lookup name writers of
@@ -17,8 +17,8 @@ readerBench doc (name, reader) =
-- we compute the length to force full evaluation
getLength (Pandoc (Meta a b c) d) =
length a + length b + length c + length d
- in bench (name ++ " reader") $ whnf (getLength .
- reader def{ readerSmart = True }) inp
+ in bench (name ++ " reader") $ whnfIO $ getLength `fmap`
+ (reader def{ readerSmart = True }) inp
writerBench :: Pandoc
-> (String, WriterOptions -> Pandoc -> String)