gearley icon indicating copy to clipboard operation
gearley copied to clipboard

Use GADTs to simplify matching on bocage nodes

Open pczarn opened this issue 8 years ago • 0 comments

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.

pczarn avatar May 21 '16 11:05 pczarn