GADTs meet their match: pattern-matching warnings that account for GADTs, guards, and laziness
GADTs meet their match: pattern-matching warnings that account for GADTs, guards, and laziness
复制标题
GADT 遇到了他们的对手:解释 GADT、守卫和懒惰的模式匹配警告
DOI:
10.1145/2784731.2784748
复制
发表时间:
2015
期刊:
影响因子:
--
通讯作者:
S. Jones
中科院分区:
文献类型:
--
作者:
G. Karachalias;Tom Schrijvers;Dimitrios Vytiniotis;S. Jones
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.