计算机科学 > 程序设计语言
[提交于 2017年2月9日]
标题:GADTs and Exhaustiveness: Looking for the Impossible
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Sound exhaustiveness checking of pattern-matching is an essential feature of functional programming languages, and OCaml supports it for GADTs. However this check is incomplete, in that it may fail to detect that a pattern can match no concrete value. In this paper we show that this problem is actually undecidable, but that we can strengthen the exhaustiveness and redundancy checks so that they cover more practical cases. The new algorithm relies on a clever modification of type inference for patterns.
提交历史
来自:EPTCS[v1] 2017年2月9日 星期四 00:00:00 UTC