pandoc-types 1.17.2 → 1.17.3
raw patch · 3 files changed
+21/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.Pandoc.Walk: instance Text.Pandoc.Walk.Walkable [Text.Pandoc.Definition.Block] Text.Pandoc.Definition.Block
+ Text.Pandoc.Walk: instance Text.Pandoc.Walk.Walkable [Text.Pandoc.Definition.Inline] Text.Pandoc.Definition.Inline
Files
- Text/Pandoc/Walk.hs +16/−8
- changelog +4/−0
- pandoc-types.cabal +1/−1
Text/Pandoc/Walk.hs view
@@ -141,30 +141,38 @@ walkM f = T.traverse (walkInlineM f) >=> f query f inlns = f inlns <> mconcat (map (queryInline f) inlns) +instance Walkable [Inline] Inline where+ walkM f = walkInlineM f+ query f = queryInline f+ instance Walkable Inline Block where- walkM f x = walkBlockM f x- query f x = queryBlock f x+ walkM f = walkBlockM f+ query f = queryBlock f instance Walkable [Inline] Block where- walkM f x = walkBlockM f x- query f x = queryBlock f x+ walkM f = walkBlockM f+ query f = queryBlock f instance Walkable Block Block where walkM f x = walkBlockM f x >>= f query f x = f x <> queryBlock f x +instance Walkable [Block] Block where+ walkM f = walkBlockM f+ query f = queryBlock f+ instance OVERLAPS Walkable [Block] [Block] where walkM f = T.traverse (walkBlockM f) >=> f query f blks = f blks <> mconcat (map (queryBlock f) blks) instance Walkable Block Inline where- walkM f x = walkInlineM f x- query f x = queryInline f x+ walkM f = walkInlineM f+ query f = queryInline f instance Walkable [Block] Inline where- walkM f x = walkInlineM f x- query f x = queryInline f x+ walkM f = walkInlineM f+ query f = queryInline f instance Walkable Block Pandoc where walkM = walkPandocM
changelog view
@@ -1,3 +1,7 @@+[1.17.3]++ * Added Walkable instances for `[Inline] Inline` and `[Block] Block`.+ [1.17.2] * Provide default implementation for walk (Albert Krewinkel).
pandoc-types.cabal view
@@ -1,5 +1,5 @@ Name: pandoc-types-Version: 1.17.2+Version: 1.17.3 Synopsis: Types for representing a structured document Description: @Text.Pandoc.Definition@ defines the 'Pandoc' data structure, which is used by pandoc to represent