Complete and easy bidirectional typechecking for higher-rank polymorphism

Jana Dunfield, Neelakantan R. Krishnaswami
2013 Proceedings of the 18th ACM SIGPLAN international conference on Functional programming - ICFP '13  
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,
more » ... wever, are less obvious. We give a declarative, bidirectional account of higher-rank polymorphism, grounded in proof theory; this calculus enjoys many properties such as η-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.
doi:10.1145/2500365.2500582 dblp:conf/icfp/DunfieldK13 fatcat:qjrde34ydfgl3huheia3anl2au