2013 · 85 citations · 35 references
ComputingComputer ScienceFormal MethodsProgramming LanguagesTheory Of ComputationData TypesPredicate LogicProof AssistantsTheorem ProvingType CheckingType SystemsBidirectional Type CheckingDeclarative SemanticsDesign PrinciplesError ReportingPolymorphic Type SystemsPolymorphic TypesType InferenceType Theory
Bidirectional typechecking, in which terms either synthesize a type or are checked against a known type, has become popular for its scalability (unlike Damas-Milner type inference, bidirectional typing remains decidable even for very expressive type systems), its error reporting, and its relative ease of implementation. Following design principles from proof theory, bidirectional typing can be applied to many type constructs. The principles underlying a bidirectional approach to polymorphism, however, are less obvious. We give a declarative, bidirectional account of higher-rank polymorphism, grounded in proof theory; this calculus enjoys many properties such as eta-reduction and predictability of annotations. We give an algorithm for implementing the declarative system; our algorithm is remarkably simple and well-behaved, despite being both sound and complete.
35
Principal type-schemes for functional programs
Robin Milner · 1982 · 1.1K citations
Dependent types in practical programming
Hongwei Xi, Frank Pfenning · 1999 · 584 citations · Full text
Practical type inference for arbitrary-rank types
Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich et al. · Journal of Functional Programming · 2006 · 213 citations · Full text