luavreis / org-mode-hs

Libraries and tool for parsing Org Mode documents with customizable exporters. 🦄
GNU General Public License v3.0
22 stars 5 forks source link

"Functored" AST: back to pandoc-types? #5

Closed luavreis closed 1 year ago

luavreis commented 2 years ago

Pandoc is considering adapting its types to be polymorphic over Inline and Block (https://github.com/jgm/pandoc-types/pull/99, https://github.com/jgm/pandoc-types/issues/98). This is very interesting as it may allow other libraries to extend the Pandoc AST. It would be nice if org-parser could drop part of its AST and use an extended version of Pandoc. That would contribute to a more unified package ecosystem and facilitate conversion between the libraries.

Unfortunately, I think most types & constructors in Org.Types would have to remain anyway, or be turned into patterns, else we lose the "org-element alikeness and expressivity".

One interesting example is uniorg in the context of unified. I will have a look at how uniorg reuses the types of unified, but JS is much more flexible in this aspect.

Ericson2314 commented 2 years ago

This the exact sort of thing I am hoping for! Glad to see others not myself have the same ideas and write them up!