aboutsummaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-10-13 23:35:12 -0700
committerJohn MacFarlane <[email protected]>2022-10-13 23:36:25 -0700
commite26c8eca6981200625de138dfb396048fa188e1a (patch)
tree52f2edbb7d94691fdb4bf2640c4732909131592f /benchmark
parentcc8ed74c2529debd15bfa2e0645662b5523ee12d (diff)
Got benchmarks compiling with new API.
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/benchmark-pandoc.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/benchmark/benchmark-pandoc.hs b/benchmark/benchmark-pandoc.hs
index a006a4309..3b3c1fa8f 100644
--- a/benchmark/benchmark-pandoc.hs
+++ b/benchmark/benchmark-pandoc.hs
@@ -28,6 +28,7 @@ import Test.Tasty.Bench
import qualified Data.ByteString.Lazy as BL
import Data.Maybe (mapMaybe)
import Data.List (sortOn)
+import Text.Pandoc.Format (FlavoredFormat(..))
readerBench :: Pandoc
-> T.Text
@@ -36,8 +37,8 @@ readerBench _ name
| name `elem` ["bibtex", "biblatex", "csljson"] = Nothing
readerBench doc name = either (const Nothing) Just $
runPure $ do
- (rdr, rexts) <- getReader name
- (wtr, wexts) <- getWriter name
+ (rdr, rexts) <- getReader $ FlavoredFormat name mempty
+ (wtr, wexts) <- getWriter $ FlavoredFormat name mempty
case (rdr, wtr) of
(TextReader r, TextWriter w) -> do
inp <- w def{ writerWrapText = WrapAuto
@@ -70,7 +71,7 @@ writerBench _ _ name
| name `elem` ["bibtex", "biblatex", "csljson"] = Nothing
writerBench imgs doc name = either (const Nothing) Just $
runPure $ do
- (wtr, wexts) <- getWriter name
+ (wtr, wexts) <- getWriter $ FlavoredFormat name mempty
case wtr of
TextWriter writerFun ->
return $ bench (T.unpack name)