Juniper icon indicating copy to clipboard operation
Juniper copied to clipboard

Exhaustivity checking for pattern matches

Open calebh opened this issue 1 year ago • 0 comments

Currently Juniper does not check for exhaustiveness of pattern matches in match or let blocks. This feature is common in functional languages and is important for avoiding unexpected crashes. It would be nice if the compiler emitted a warning for non-exhaustive patterns. An additional feature that can probably be implemented in the same time is for determining if a match clause is unreachable due to a previous pattern. In papers that I've read that explore these topics, both of these features can be implemented using the same logic.

calebh avatar Nov 23 '23 00:11 calebh