A generic algorithm for checking exhaustivity of pattern matching

Algebraic data types and pattern matching are key features of functional programming languages. Exhaustivity checking of pattern matching is a safety belt that defends against unmatched exceptions at runtime and boosts type safety. However, the presence of language features like inheritance, typecase, traits, GADTs, path-dependent types and union types makes the checking difficult and the algorithm complex. In this paper we propose a generic algorithm that decouples the checking algorithm from specific type theories. The decoupling makes the algorithm simple and enables easy customization for specific type systems.


Published in:
SCALA 2016 Proceedings of the 2016 7th ACM SIGPLAN Symposium on Scala
Presented at:
SCALA 2016, Amsterdam, Netherlands, October 30 - 31, 2016
Year:
2016
ISBN:
978-1-4503-4648-1
Keywords:
Laboratories:




 Record created 2017-02-02, last modified 2018-12-03

n/a:
Download fulltext
PDF

Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)