jgm / pandoc-types

types for representing structured documents
http://johnmacfarlane.net/pandoc
Other
107 stars 66 forks source link

Improve Walk #89

Open jgm opened 3 years ago

jgm commented 3 years ago

Walk is a bit of a mess. It seems we should be able to do something more elegant, using recursion schemes or something.

For motivation see jgm/pandoc#7130. Here we have walk fixLinks where fixLinks is [Inline] -> [Inline]. It works fine if applied to [Inline]. However, it behaves differently if you apply it to Inlines. Seems like instead of having instances specifically for lists, we should have general instances that work for all Traversable/Foldable structures, including Many.

ricnorr commented 2 years ago

Is it already fixed? I can't find any 'Inlines' in code.

jgm commented 2 years ago

Inlines from T.P.Builder