GADTs meet their match: pattern-matching warnings that account for GADTs, guards, and laziness

Georgios Karachalias, Dimitrios Vytiniotis, Simon Peyton Jones

ACM International Conference on Functional Programming 2015 (ICFP'15) |

For ML and Haskell, accurate warnings when a function definition has redundant or missing patterns are mission critical. But today’s compilers generate bogus warnings when the programmer uses guards (even simple ones), GADTs, pattern guards, or view patterns. We give the first algorithm that handles all these cases in a single, uniform framework, together with an implementation in GHC, and evidence of its utility in practice.