Affiliation:
1. Max Planck Institute for Software Systems, Kaiserslautern and Saarbrücken, Germany
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
38 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Total Type Error Localization and Recovery with Holes;Proceedings of the ACM on Programming Languages;2024-01-05
2. When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism;Proceedings of the ACM on Programming Languages;2024-01-05
3. Signature restriction for polymorphic algebraic effects;Journal of Functional Programming;2024
4. Focusing on Refinement Typing;ACM Transactions on Programming Languages and Systems;2023-12-20
5. Greedy Implicit Bounded Quantification;Proceedings of the ACM on Programming Languages;2023-10-16