Closed leoqiao18 closed 2 years ago
Not fully implemented at the moment. Initial version should be done within the next few days. Will add the pass to compiler pipeline once initial version is completed.
Pattern matching stuff are all implemented now, including:
All test cases are passing except for "drop inference in pattern matching" in the DropInference
suite. I don't know why it's failing, but I am inclined to believe that it is some problem with the test case itself. @j-hui
Desugar recursive pattern matches to non-recursive pattern matches in AST. Algorithm is referenced from Chapter 5 (by Phil Wadler) "Efficient Compilation of Pattern-matching" of "The Implementation of Functional Programming Languages" by Simon Peyton Jones.