summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-12-29 17:44:02 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-12-29 17:54:07 -0800
commit1864bb0994cc70b99ea8207b3a22438c343348c0 (patch)
tree79c773cad15876d1f37f3907c8eec45ac278b6b5 /benchmark
parent32c5a8e2dcc1262a8181d0f9b6ffe208e7499481 (diff)
Data files changes.
* Added `embed_data_files` flag. (not yet used) * Shared no longer exports `findDataFile`. * `readDataFile` now returns a strict bytestring. * Shared now exports `readDataFileUTF8` which returns a string like the old `readDataFile`. * Rewrote modules to use new data file functions and to avoid using functions from Paths_pandoc directly.
Diffstat (limited to 'benchmark')
-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 728e45b56..015d0135a 100644
--- a/benchmark/benchmark-pandoc.hs
+++ b/benchmark/benchmark-pandoc.hs
@@ -1,5 +1,5 @@
import Text.Pandoc
-import Text.Pandoc.Shared (readDataFile, normalize)
+import Text.Pandoc.Shared (readDataFileUTF8, normalize)
import Criterion.Main
import Criterion.Config
import Text.JSON.Generic
@@ -35,8 +35,8 @@ main :: IO ()
main = do
args <- getArgs
(conf,_) <- parseArgs defaultConfig{ cfgSamples = Last $ Just 20 } defaultOptions args
- inp <- readDataFile (Just ".") "README"
- inp2 <- readDataFile (Just ".") "tests/testsuite.txt"
+ inp <- readDataFileUTF8 (Just ".") "README"
+ inp2 <- readDataFileUTF8 (Just ".") "tests/testsuite.txt"
let opts = def{ readerSmart = True }
let doc = readMarkdown opts $ inp ++ unlines (drop 3 $ lines inp2)
let readerBs = map (readerBench doc) readers