Contents
1 Introduction
Part I An algorithm for detecting the anomalies
2 Patterns, values, etc.
3 The useful clause problem
3.1 Solving the useful clause problem
3.2 Detecting the anomalies
4 Lazy pattern matching
4.1 Lazy pattern matching in theory
4.2 Lazy pattern matching, à la Laville
4.3 Pattern matching in Haskell
4.4 Or-patterns in Haskell
Part II Implementation
5 Specializing
U
for exhaustiveness check
6 Specializing
U
for the useless clause problem
6.1 Useless clause is (almost) enough
6.2 Expansion of or-patterns
6.3 Rules for finding useless patterns
6.4 Computation of useless patterns
7 Performance
7.1 Elements of complexity analysis
7.2 Safeguards
7.3 Measures
8 Conclusion
A Series of examples