Principal type inference for GADTs

Principal type inference for GADTs
复制标题

GADT 的主要类型推断

DOI:
10.1145/2837614.2837665
复制
发表时间:
2016
期刊:
Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
影响因子:
--
通讯作者:
Martin Erwig
Martin Erwig
中科院分区:
--
文献类型:
--
作者:
Sheng Chen;Martin Erwig

文献摘要

参考文献

被引文献

相似文献

我们提出了一种新的GADT类型推理方法,提高了以前方法的精确度。特别是,我们的方法接受更多的类型正确的程序比以前的方法时,他们不采用类型注释。我们的方法的一个好处是,它可以检测到广泛的运行时错误,以前的方法错过了。我们的方法是基于这样的想法来表示类型的选择类型,这有利于分离的类型和和解阶段,从而支持情况下的表达式在模式匹配的分支细化。这个想法是形式化的类型系统,这是既健全和保守的扩展经典Hindley-Milner系统。我们提出了一个实证评估的结果,比较我们的算法与以前的方法。
We present a new method for GADT type inference that improves the precision of previous approaches. In particular, our approach accepts more type-correct programs than previous approaches when they do not employ type annotations. A side benefit of our approach is that it can detect a wide range of runtime errors that are missed by previous approaches. Our method is based on the idea to represent type refinements in pattern-matching branches by choice types, which facilitate a separation of the typing and reconciliation phases and thus support case expressions. This idea is formalized in a type system, which is both sound and a conservative extension of the classical Hindley-Milner system. We present the results of an empirical evaluation that compares our algorithm with previous approaches.
DOI: 10.1145/2491411.2491437
发表时间: 2013-08
期刊: --
影响因子: --
作者:
Jörg Liebig;Alexander von Rhein;Christian Kästner;S. Apel;Jens Dörre;C. Lengauer
通讯作者: Jörg Liebig;Alexander von Rhein;Christian Kästner;S. Apel;Jens Dörre;C. Lengauer