I'm experimenting with recursion schemes and more exotic and potentially better representations of the AST than recursive lists. Still, this changeset represents a subjective improvement regardless of whether or not that other stuff pans out. Rather than a series of mutually recursive sum types, the AST is now represented as a list of a single recursive sum type. This arguably improves both readability and writeability; no more "what is This?", and no more having to remember the names of the nested sum constructors.
The commits are large but each represent a very narrow change. Look at the Intlc.ICU module as a starting point for the AST change and then a quick look around elsewhere to see how it affects the codebase.
I'm experimenting with recursion schemes and more exotic and potentially better representations of the AST than recursive lists. Still, this changeset represents a subjective improvement regardless of whether or not that other stuff pans out. Rather than a series of mutually recursive sum types, the AST is now represented as a list of a single recursive sum type. This arguably improves both readability and writeability; no more "what is
This
?", and no more having to remember the names of the nested sum constructors.The commits are large but each represent a very narrow change. Look at the
Intlc.ICU
module as a starting point for the AST change and then a quick look around elsewhere to see how it affects the codebase.