Closed leoqiao18 closed 2 years ago
Marking as Draft until thus lands changes to the main compiler pipeline
This commit is a very ugly/work-in-progress version of the exhaustion check. I will now work on integration tests for this checker pass. With the tests, I will refactor the code to a more stylistically reasonable state.
Based on "Warnings for pattern matching" paper (link).
Currently implemented as a separate module that does not affect the rest of the compiler pipeline. Supports exhaustion check and finding useless clause. Unit test written in
match
test module.Possible further improvements: provide counter-example for non-exhaustion case.
TODO: combine and merge with AST patterns.