summaryrefslogtreecommitdiff
path: root/benchmark/benchmark-pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-08-01 13:20:08 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-08-01 13:20:08 -0700
commit836d1f06bb4ea38681c7daf8c8446a7c1be7716e (patch)
tree46a0a742a1aa5ea61592af1596c1e118ef3dc624 /benchmark/benchmark-pandoc.hs
parenta1bb71a02cf4e36147544f32263100aa1b415515 (diff)
Use nfIO in benchmark instead of getLength trick.
Diffstat (limited to 'benchmark/benchmark-pandoc.hs')
-rw-r--r--benchmark/benchmark-pandoc.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/benchmark/benchmark-pandoc.hs b/benchmark/benchmark-pandoc.hs
index 294d385dd..0dc26ad00 100644
--- a/benchmark/benchmark-pandoc.hs
+++ b/benchmark/benchmark-pandoc.hs
@@ -29,9 +29,7 @@ readerBench :: Pandoc
readerBench doc (name, reader) = case lookup name writers of
Just (PureStringWriter writer) ->
let inp = writer def{ writerWrapText = True} doc
- -- we compute the length to force full evaluation
- getLength (Pandoc (Meta _) d) = length d
- in return $ bench (name ++ " reader") $ whnfIO $ getLength `fmap`
+ in return $ bench (name ++ " reader") $ nfIO $
(reader def{ readerSmart = True }) inp
_ -> trace ("\nCould not find writer for " ++ name ++ "\n") Nothing