Tracing ambiguity in GADT type inference - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2012

Tracing ambiguity in GADT type inference

Résumé

GADTs, short for Generalized Algebraic DataTypes, extend usual algebraicdatatypes with a form of dependent typing that has many usefulapplications, but raises serious issues for type inference. Patternmatching on GADTs introduces type equalities with limited scopes, whichare a source of ambiguities that may destroy principal types---and mustbe resolved by type annotations. By tracing ambiguities in types, we maytighten the definition of ambiguities and confine them, so as to requestfewer type annotations. Now in use in OCaml 4.00, this solution alsolifts some restriction on object types and polymorphic types thatappeared in a previous implementation of GADTs in OCaml.
Fichier principal
Vignette du fichier
Garrigue-Remy:gadts@ml2012.pdf (125.34 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-01093845 , version 1 (11-12-2014)

Identifiants

  • HAL Id : hal-01093845 , version 1

Citer

Jacques Garrigue, Didier Rémy. Tracing ambiguity in GADT type inference. ACM SIGPLAN Workshop on ML, Sep 2012, copenhagen, Denmark. ⟨hal-01093845⟩

Collections

INRIA INRIA2
131 Consultations
34 Téléchargements

Partager

Gmail Facebook X LinkedIn More