Type variables in patterns

06/09/2018
by   Richard A. Eisenberg, et al.
0

For many years, GHC has implemented an extension to Haskell that allows type variables to be bound in type signatures and patterns, and to scope over terms. This extension was never properly specified. We rectify that oversight here. With the formal specification in hand, the otherwise-labyrinthine path toward a design for binding type variables in patterns becomes blindingly clear. We thus extend ScopedTypeVariables to bind type variables explicitly, obviating the Proxy workaround to the dustbin of history.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/16/2021

A Gradual Type System for Elixir

Elixir is a functional programming language with dynamic typing. We prop...
research
04/01/2020

FreezeML: Complete and Easy Type Inference for First-Class Polymorphism

ML is remarkable in providing statically typed polymorphism without the ...
research
03/22/2023

Type-respecting amalgamation and big Ramsey degrees

We give an infinitary extension of the Nešetřil-Rödl theorem for categor...
research
02/05/2020

Patterns for Name Analysis and Type Analysis with JastAdd

In the last two decades, tools have been implemented to more formally sp...
research
11/28/2019

Two Formal Systems of the λδ Family Revised

We present the framework λδ-2B that significantly improves and generaliz...
research
09/24/2017

Anonymous Variables in Imperative Languages

In this paper, we bring anonymous variables into imperative languages. A...
research
06/28/2019

Bidirectional Type Class Instances (Extended Version)

GADTs were introduced in Haskell's eco-system more than a decade ago, bu...

Please sign up or login with your details

Forgot password? Click here to reset