First-Class Subtypes

05/16/2019
by   Jeremy Yallop, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/09/2017

Cons-free Programming with Immutable Functions

We investigate the power of non-determinism in purely functional program...
research
12/14/2018

Truly Visual Polymorphic Algebraic Data Structures through Maramafication

This paper presents a so-called maramafication of an essential part of f...
research
05/26/2019

Programming with Applicative-like expressions

The fact that Applicative type class allows one to express simple parser...
research
07/13/2023

Typed Design Patterns for the Functional Era

This paper explores how design patterns could be revisited in the era of...
research
03/29/2021

A simpler encoding of indexed types

In functional programming languages, generalized algebraic data types (G...
research
11/17/2020

Learning functional programs with function invention and reuse

Inductive programming (IP) is a field whose main goal is synthesising pr...
research
08/25/2021

Latent Effects for Reusable Language Components: Extended Version

The development of programming languages can be quite complicated and co...

Please sign up or login with your details

Forgot password? Click here to reset