Memorytaco/t-lang

craft pattern compiler derived from decision tree

Opened this issue · 1 comments

One modern feature for language is pattern matching and we want to include it in compiler as soon as possible. However this is not a trivial feature even after we have a quite low level representation of code.

To compile a pattern matching statement, we need to craft something to convert patterns into decision trees first and then employ some algorithm to generate code testing and branching.

Luckily, we have a start point from this hackage library pattern-matcher. And yes, we have a paper as companion.