Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism
Jana Dunfield, Neelakantan R. Krishnaswami

TL;DR
This paper presents a simple, sound, and complete bidirectional typechecking algorithm for higher-rank polymorphism, grounded in proof theory, improving scalability and error reporting in expressive type systems.
Contribution
It introduces a declarative, bidirectional approach to higher-rank polymorphism based on proof theory, with a straightforward and well-behaved implementation algorithm.
Findings
The calculus supports eta-reduction and predictable annotations.
The algorithm is both sound and complete.
The approach enhances scalability and error reporting.
Abstract
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Mathematics, Computing, and Information Processing · Natural Language Processing Techniques
