Tracing ambiguity in GADT type inference - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Conference Papers Year : 2012

Tracing ambiguity in GADT type inference


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
Origin : Files produced by the author(s)

Dates and versions

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


  • HAL Id : hal-01093845 , version 1


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


131 View
32 Download


Gmail Facebook Twitter LinkedIn More