Skip to Main content Skip to Navigation
Conference papers

Tracing ambiguity in GADT type inference

Abstract : 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.
Document type :
Conference papers
Complete list of metadata

Cited literature [3 references]  Display  Hide  Download
Contributor : Didier Rémy Connect in order to contact the contributor
Submitted on : Thursday, December 11, 2014 - 11:20:25 AM
Last modification on : Tuesday, July 5, 2022 - 8:39:02 AM
Long-term archiving on: : Thursday, March 12, 2015 - 10:27:23 AM


Files produced by the author(s)


  • 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⟩



Record views


Files downloads