Ambivalent Types for Principal Type Inference with GADTs (extended version) - Inria - Institut national de recherche en sciences et technologies du numérique
Pré-Publication, Document De Travail Année : 2013

Ambivalent Types for Principal Type Inference with GADTs (extended version)

Résumé

GADTs, short for Generalized Algebraic DataTypes, which allow constructors of algebraic datatypes to be non-surjective, have many useful applications. However, pattern matching on GADTsintroduces 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.
Fichier principal
Vignette du fichier
Garrigue-Remy_gadts_long2013.pdf (292.93 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00914493 , version 1 (06-12-2013)
hal-00914493 , version 2 (10-12-2013)

Identifiants

  • HAL Id : hal-00914493 , version 2

Citer

Jacques Garrigue, Didier Rémy. Ambivalent Types for Principal Type Inference with GADTs (extended version). 2013. ⟨hal-00914493v2⟩

Collections

INRIA INRIA2
154 Consultations
208 Téléchargements

Partager

More