Ambivalent types for principal type inference with GADTs

11Citations
Citations of this article
7Readers
Mendeley users who have this article in their library.
Get full text

Abstract

GADTs, short for Generalized Algebraic DataTypes, which allow constructors of algebraic datatypes to be non-surjective, have many useful applications. However, pattern matching on GADTs introduces local type equality assumptions, which are a source of ambiguities that may destroy principal types - and must be resolved by type annotations. We introduce ambivalent types to tighten the definition of ambiguities and better confine them, so that type inference has principal types, remains monotonic, and requires fewer type annotations. © Springer International Publishing 2013.

Cite

CITATION STYLE

APA

Garrigue, J., & Rémy, D. (2013). Ambivalent types for principal type inference with GADTs. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 8301 LNCS, pp. 257–272). https://doi.org/10.1007/978-3-319-03542-0_19

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free