gearley
gearley copied to clipboard
Use GADTs to simplify matching on bocage nodes
The Sum variant of Node holds a summands
slice, which contains Nodes. It is certain that these Nodes can only come from two constructors -- Product or ShallowProduct -- and not other constructors.
It would be even nicer to statically express that a bocage entirely pre-evaluation can't contain ShallowProduct, Evaluated and Leaf.