GADTs meet subtyping

@inproceedings{Scherer2013GADTsMS,
  title={GADTs meet subtyping},
  author={Gabriel Scherer and Didier R{\'e}my},
  booktitle={ESOP},
  year={2013}
}
While generalized algebraic datatypes (GADTs) are now considered well-understood, adding them to a language with a notion of subtyping comes with a few surprises. [...] Key Method We allow variance annotations in GADT definitions, study their soundness, and present a sound and complete algorithm to check them. Our work may be applied to real-world ML-like languages with explicit subtyping such as OCaml, or to languages with general subtyping constraints.Expand
Towards improved GADT reasoning in Scala
TLDR
This work informally explore foundations for GADTs within Scala's core type system, to guide a principled understanding and implementation of GadTs in Scala. Expand
Formal foundations for GADTs in Scala
GADTs are a very useful language feature that allow encoding some invariants in types. GADT reasoning is currently implemented in Scala and Dotty, but it’s plagued with soundness issues. To get aExpand
Unboxing Mutually Recursive Type Definitions in OCaml
TLDR
The notion of separability as a semantic for the unboxing criterion is explained, and a set of inference rules to check separability is proposed, from which a new implementation of the unboxes check that properly supports mutually-recursive definitions is derived. Expand
Safe zero-cost coercions for Haskell
TLDR
A new mechanism is presented that allows for zero-cost conversions between generative type abstractions and their representations, even when such types are deeply nested and type safety in the presence of these conversions is proved. Expand
Safe zero-cost coercions for Haskell
TLDR
This work presents a new mechanism that allows for zero-cost conversions between generative type abstractions and their representations, even when such types are deeply nested, and proves type safety in the presence of these conversions. Expand
First-Class Subtypes
TLDR
This work presents several encodings of first-class subtypes using existing features of the OCaml language, and shows that any such encodations are interconvertible, and illustrates the utility of the encodments with several examples. Expand
Terms of use : Click here Safe zero-cost coercions for Haskell
Generative type abstractions – present in Haskell, OCaml, and other languages – are useful concepts to help prevent programmer errors. They serve to create new types that are distinct at compile timeExpand
Safe Zero-cost Coercions for Haskell (extended version)
TLDR
A new mechanism is presented that allows for zero-cost conversions between generative type abstractions and a run-time representation of that type. Expand
Implementing path-dependent GADT reasoning for Scala 3
TLDR
This paper shows how the existing constraint-based GADT reasoning of the Scala 3 compiler is extended to also consider path-dependent types, making Scala’s support for G ADT programming more complete and bringing Scala closer to its formal foundations. Expand

References

SHOWING 1-10 OF 30 REFERENCES
Polarized Subtyping for Sized Types
TLDR
An algorithm for deciding polarized higher-order subtyping without bounded quantification is presented and a direct proof of completeness is given, without constructing a model or establishing a strong normalization theorem. Expand
Variance and Generalized Constraints for C# Generics
TLDR
A system of type-safe variance for C that supports the declaration of covariant and contravariant type parameters on generic types and formalizes the subtype relation in both declarative and syntax-directed style. Expand
A constraint-based approach to guarded algebraic data types
TLDR
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. Expand
Relaxing the Value Restriction
TLDR
This work uses a subtyping based approach to recover part of this lost polymorphism, without changing the type algebra itself, and this has significant applications. Expand
Generalized algebraic data types and object-oriented programming
TLDR
This work proposes a generalization of the type constraint mechanisms of C# and Java to both avoid the need for casts in GADT programs and higher-order contortions in PADTs programs, and presents a Visitor pattern for GADTs, and describes a refined switch construct as an alternative to virtual dispatch on datatypes. Expand
Intensionality, extensionality, and proof irrelevance in modal type theory
  • F. Pfenning
  • Mathematics, Computer Science
  • Proceedings 16th Annual IEEE Symposium on Logic in Computer Science
  • 2001
TLDR
A uniform type theory that integrates intensionality, extensionality and proof irrelevance as judgmental concepts is developed that contrasts with previous approaches that, a priori, distinguished propositions from specifications. Expand
Mathematical Structures in Computer Science
TLDR
Computability, despite having exact access to its own discrete data type, provides a unique tool for the investigation of ‘unpredictability’ in both Physics and Biology through its fine-grained analysis of undecidability. Expand
Gallium – INRIA) GADTs meet Subtyping
  • Gallium – INRIA) GADTs meet Subtyping
  • 2014
GADTs meet subtyping. Long version, available electronically. URL: http://gallium.inria.fr/ ~ remy/gadts
  • GADTs meet subtyping. Long version, available electronically. URL: http://gallium.inria.fr/ ~ remy/gadts
  • 2013
Gallium) GADTs meet Subtyping
  • Gallium) GADTs meet Subtyping
  • 2013
...
1
2
3
...