Principal type inference for GADTs
Principal type inference for GADTs
复制标题
GADT 的主要类型推断
DOI:
10.1145/2837614.2837665
复制
发表时间:
2016
期刊:
影响因子:
--
通讯作者:
Martin Erwig
中科院分区:
文献类型:
--
作者:
Sheng Chen;Martin Erwig
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