Warnings for pattern matching
Luc Maranget · Journal of Functional Programming · 2007
Abstract We examine the ML pattern-matching anomalies of useless clauses and non-exhaustive matches. We state the definition of these anomalies, building upon pattern matching semantics, and propose a simple algorithm to detect them. We have integrated the algorithm in the Objective Caml compiler, but we show that the same algorithm is also usable in a non-strict language such as Haskell. Or-patterns are considered for both strict and non-strict languages.
Cited by 36 works. doi:10.1017/s0956796807006223 Open-access PDF
Authors
References
- The Definition of Standard ML
- The implementation of functional programming languages
- Compiling pattern matching
- Standard ML of New Jersey
- Report on the Programming Language Haskell, A Non-strict, Purely Functional Language.
- The Glasgow Haskell Compiler: a technical overview
- Call by need computations in non-ambiguous linear term rewriting systems
- Functional Programming Languages and Computer Architecture
- Optimizing pattern matching
- Adaptive Pattern Matching