Lune

PLDI2020Top-tier venue

FreezeML: complete and easy type inference for first-class polymorphism

Frank Emrich, Sam Lindley, Jan Stolarek, James Cheney, Jonathan Coates

2020Year
13Citations
5Top-tier citations

Abstract

ML is remarkable in providing statically typed polymorphism without the programmer ever having to write any type annotations. The cost of this parsimony is that the programmer is limited to a form of polymorphism in which quantifiers can occur only at the outermost level of a type and type variables can be instantiated only with monomorphic types.

Type inference for unrestricted System F-style polymorphism is undecidable in general. Nevertheless, the literature abounds with a range of proposals to bridge the gap between ML and System F.

We put forth a new proposal, FreezeML, a conservative extension of ML with two new features. First, let-and lambdabinders may be annotated with arbitrary System F types. Second, variable occurrences may be frozen, explicitly disabling instantiation. FreezeML is equipped with type-preserving translations back and forth between System F and admits a type inference algorithm, an extension of algorithm W, that is sound and complete and which yields principal types.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext e7bad45f-2a70-43ec-9c24-08d2629562f6

Cited by top-tier papers5

Ask how each one uses it

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines