OutsideIn(X) Modular type inference with local assumptions


Advanced type system features, such as GADTs, type classes, and type families have have proven to be invaluable language extensions for ensuring data invariants and program correctness among others. Unfortunately, they pose a tough problem for type inference, because they introduce local type assumptions. In this article we present a novel constraint-based type inference approach for local type assumptions. Our system, called OutsideIn(X), is parameterised over the particular underlying constraint domain X, in the same way as HM(X). This stratification allows us to use a common metatheory and inference algorithm. Going beyond the general framework, we also give a particular constraint solver for X = type classes + GADTs + type families, a non-trivial challenge in its own right. 2 Vytiniotis, Schrijvers, Peyton Jones, Sulzmann

DOI: 10.1017/S0956796811000098

Extracted Key Phrases

23 Figures and Tables

Citations per Year

81 Citations

Semantic Scholar estimates that this publication has 81 citations based on the available data.

See our FAQ for additional information.

Cite this paper

@article{Vytiniotis2011OutsideInXMT, title={OutsideIn(X) Modular type inference with local assumptions}, author={Dimitrios Vytiniotis and Simon L. Peyton Jones and Tom Schrijvers and Martin Sulzmann}, journal={J. Funct. Program.}, year={2011}, volume={21}, pages={333-412} }