git.iko.soy/typeable/pandoc
on master help sign in
Use foldrWithKey instead of deprecated foldWithKey.
commit3a36441b617b9dff632eda0ac14ca26072e0730b authorJohn MacFarlane <jgm@berkeley.edu> dateThu 13 Jul 2017, 23:37 (9 years ago) parent247257e
3 files changed+4−4
pandoc.cabal+2−2 src/Text/Pandoc/MediaBag.hs+1−1 src/Text/Pandoc/Writers/Shared.hs+1−1
pandoc.cabal+2−2
@@ -283,7 +283,7 @@ Flag old-locale
283283Library
284284 Build-Depends: base >= 4.7 && < 5,
285285 syb >= 0.1 && < 0.8,
286− containers >= 0.1 && < 0.6,
286+ containers >= 0.4.2.1 && < 0.6,
287287 unordered-containers >= 0.2 && < 0.3,
288288 parsec >= 3.1 && < 3.2,
289289 mtl >= 2.2 && < 2.3,
@@ -546,7 +546,7 @@ Test-Suite test-pandoc
546546 tasty-quickcheck >= 0.8 && < 0.9,
547547 tasty-golden >= 2.3 && < 2.4,
548548 QuickCheck >= 2.4 && < 2.11,
549− containers >= 0.1 && < 0.6,
549+ containers >= 0.4.2.1 && < 0.6,
550550 executable-path >= 0.0 && < 0.1,
551551 zip-archive >= 0.2.3.4 && < 0.4,
552552 mtl >= 2.2 && < 2.3
src/Text/Pandoc/MediaBag.hs+1−1
@@ -79,5 +79,5 @@ lookupMedia fp (MediaBag mediamap) = M.lookup (splitDirectories fp) mediamap
7979-- their corresponding mime types and the lengths in bytes of the contents.
8080mediaDirectory :: MediaBag -> [(String, MimeType, Int)]
8181mediaDirectory (MediaBag mediamap) =
82− M.foldWithKey (\fp (mime,contents) ->
82+ M.foldrWithKey (\fp (mime,contents) ->
8383 (((Posix.joinPath fp), mime, fromIntegral $ BL.length contents):)) [] mediamap
src/Text/Pandoc/Writers/Shared.hs+1−1
@@ -84,7 +84,7 @@ metaToJSON' blockWriter inlineWriter (Meta metamap) = do
8484 renderedMap <- Traversable.mapM
8585 (metaValueToJSON blockWriter inlineWriter)
8686 metamap
87− return $ M.foldWithKey defField (Object H.empty) renderedMap
87+ return $ M.foldrWithKey defField (Object H.empty) renderedMap
8888
8989-- | Add variables to JSON object, replacing any existing values.
9090-- Also include @meta-json@, a field containing a string representation