bjpop / language-python

A parser for Python 2.x and 3.x written in Haskell
157 stars 45 forks source link

Foldable, Traversable, Recursive and Corecursive via micro-recursion-schemes #72

Closed ocramz closed 2 years ago

ocramz commented 2 years ago

Adding a small dependency

https://hackage.haskell.org/package/micro-recursion-schemes

(which in turn only depends on template-haskell and th-abstraction)

gives us generic traversals, folds and unfolds, which are handy for processing ASTs.

ocramz commented 2 years ago

Adding this turns out to be a lot of work, to accommodate mutually-recursive types and for uncertain payoff.