Specialize traces
Currently, the ASTs represented by our builders form annotated binary trees, and as such, having traces be either Trace::Left
or Trace::Right
is okay. However, I will need more complex traces to represent builders once let
bindings and pattern matches are added. As such, I believe it would be best to make the Trace
enum type contain specific constructors to each builder shape, like AbsLeft
, AbsRight
. This will allow one to easily add new builders such as let
, for which traces would be LetType
, LetDef
and LetBody
.