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

https://hal.inria.fr/hal-01093845
Contributor : Didier Rémy <>
Submitted on : Thursday, December 11, 2014 - 11:20:25 AM
Last modification on : Thursday, March 5, 2020 - 4:53:34 PM
Long-term archiving on: : Thursday, March 12, 2015 - 10:27:23 AM

File

Garrigue-Remy:gadts@ml2012.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-01093845, version 1

Collections

Citation

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

Share

Metrics

Record views

180

Files downloads

77