Sound and complete bidirectional typechecking for higher-rank polymorphism with existentials and indexed types
@article{Dunfield2019SoundAC, title={Sound and complete bidirectional typechecking for higher-rank polymorphism with existentials and indexed types}, author={Jana Dunfield and Neelakantan R. Krishnaswami}, journal={Proceedings of the ACM on Programming Languages}, year={2019}, volume={3}, pages={1 - 28} }
Bidirectional typechecking, in which terms either synthesize a type or are checked against a known type, has become popular for its applicability to a variety of type systems, its error reporting, and its ease of implementation. [] Key Method This approach permits declarative rules for coverage of pattern matching, as well as support for first-class existential types using a focalized subtyping judgment.
Figures from this paper
13 Citations
An existential crisis resolved: type inference for first-class existential types
- Computer ScienceProc. ACM Program. Lang.
- 2021
This paper presents a bidirectional type-inference algorithm that infers where to introduce and eliminate existentials without any annotations in terms, along with an explicitly typed, type-safe core language usable as a compilation target.
Polarized Subtyping
- Computer ScienceArXiv
- 2022
A semantic characterization of typing with step indexing to capture observation depth of recursive computations and a bidirectional syntactic typing system for both values and computations that elegantly and pragmatically circumvents difficulties of type inference in the presence of width and depth subtyping for variant and lazy records.
A mechanical formalization of higher-ranked polymorphic type inference
- Computer ScienceProc. ACM Program. Lang.
- 2019
This paper presents the first full mechanical formalization of the metatheory for higher-ranked polymorphic type inference in the Abella theorem prover of DK's declarative type system with a novel algorithmic system.
A dependently typed calculus with polymorphic subtyping
- Computer Science, BiologySci. Comput. Program.
- 2021
Bidirectional type checking for relational properties
- Computer SciencePLDI
- 2019
This paper develops bidirectional relational type checking for systems with relational refinements and effects, and significantly reduces the need for typing annotations through the combination of type checking and type inference.
Quantitative program reasoning with graded modal types
- Computer ScienceProc. ACM Program. Lang.
- 2019
This work proposes the umbrella notion of graded modal types, encompassing coeffect types and dual notions of type-based effect reasoning via graded monads, and demonstrates this approach via a type system embodied in a fully-fledged functional language called Granule.
On type-cases, union elimination, and occurrence typing
- Mathematics, Computer ScienceProc. ACM Program. Lang.
- 2022
It is shown that the combination of the union elimination rule of the former and the typing rules for type-cases of the extension encompasses occurrence typing, and a canonical form is defined for the expressions of this extension, called MSC-form.
Bidirectional Typing
- Computer ScienceACM Comput. Surv.
- 2021
The design principles that underlie bidirectional type systems are highlighted, the development of bid Directional typing from the prehistoric period before Pierce and Turner’s local type inference to the present day is surveyed, and guidance for future investigations is provided.
Refinement types in Futhark
- Computer Science
- 2019
It is shown that the types of a small program can be refined in such a way that array bounds checks can be safely omitted, and a set of bidirectional type rules for the internal language and a type checker implemented in Haskell based on the type rules are presented.
A quick look at impredicativity
- Computer ScienceProc. ACM Program. Lang.
- 2020
Quick Look is presented, a practical, implemented, and deployable design for impredicative type inference, and modified GHC, a production-quality Haskell compiler, to support impredicativity.
References
SHOWING 1-10 OF 62 REFERENCES
Complete and easy bidirectional typechecking for higher-rank polymorphism
- Computer ScienceICFP 2013
- 2013
This work gives a declarative, bidirectional account of higher-rank polymorphism, grounded in proof theory, and gives an algorithm for implementing theDeclarative system, which is remarkably simple and well-behaved.
A type-theoretic foundation for programming with higher-order abstract syntax and first-class substitutions
- Computer SciencePOPL '08
- 2008
This paper presents a novel type-theoretic foundation based on contextual modal types which allows us to recursively analyze open terms via higher-order pattern matching and demonstrates that the framework provides a name-safe foundation to operations typically found in nominal systems.
A constraint-based approach to guarded algebraic data types
- Computer ScienceTOPL
- 2007
It is proved that HMG(X) is sound and that, provided recursive definitions carry a type annotation, type inference can be reduced to constraint solving.
A unified system of type refinements
- Computer Science
- 2007
This work presents a system of type refinements that unifies and extends past work on datasort and index refinements, and provides unified mechanisms of definite types, such as intersections, and indefinite types,such as unions.
Type Assignment for Intersections and Unions in Call-by-Value Languages
- MathematicsFoSSaCS
- 2003
A system of type assignment with intersection types, union types, indexed types, and universal and existential dependent types that is sound in a call-by-value functional language is developed and provides a uniform generalization and explanation of several earlier isolated systems.
Dependent types in practical programming
- Computer SciencePOPL '99
- 1999
We present an approach to enriching the type system of ML with a restricted form of dependent types, where type index objects are drawn from a constraint domain C, leading to the DML(C) language…
Polymorphism, subtyping, and type inference in MLsub
- Computer SciencePOPL
- 2017
A type system combining subtyping and ML-style parametric polymorphism that supports type inference and has compact principal types is presented, which types a strict superset of core ML programs.
Intersection types and computational effects
- Computer ScienceICFP '00
- 2000
A solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML is proposed, which is not tied to let-expressions and requires an additional weakening of the usual subtyping rules.
Polymorphic type inference and abstract data types
- Computer ScienceTOPL
- 1994
This work shows how to add significant expressive power to statically typed functional languages with explicit type variables by incorporating first-class abstract types as an extension of algebraic data types and extends record types to allow abstract components.
Verifying a Semantic βη-Conversion Test for Martin-Löf Type Theory
- Computer Science
- 2008
This work analyzes a version of Coquand’s algorithm for checking the βη-equality of semantic values in a theory with a predicative universe hierarchy and large elimination rules and uses the new notions of contextual reification and strong semantic equality.