First-class subtypes
Published version
Peer-reviewed
Repository URI
Repository DOI
Change log
Authors
Yallop, J
Dolan, S
Abstract
First class type equalities, in the form of generalized algebraic data types (GADTs), are commonly found in functional programs. However, first-class representations of other relations between types, such as subtyping, are not yet directly supported in most functional programming languages. We present several encodings of first-class subtypes using existing features of the OCaml language (made more convenient by the proposed modular implicits extension), show that any such encodings are interconvertible, and illustrate the utility of the encodings with several examples.
Description
Keywords
cs.PL, cs.PL
Journal Title
Electronic Proceedings in Theoretical Computer Science, EPTCS
Conference Name
Journal ISSN
2075-2180
2075-2180
2075-2180
Volume Title
294
Publisher
Open Publishing Association