diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-04 11:11:42 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-04 11:11:42 -0800 |
commit | 024c1ad3c5b7745dc60ce0aa30f6900021043ba0 (patch) | |
tree | c5e261fcf3ff3d5c6b11106cc71a96510f7c292a /benchmark | |
parent | 3bea3635d69fd61caf44fe3ab48499cbbca44b13 (diff) |
Updated benchmark code for changes in Text.Pandoc.
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/benchmark-pandoc.hs | 6 |
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) |