English

Type variables in patterns

Programming Languages 2018-06-12 v1

Abstract

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.

Keywords

Cite

@article{arxiv.1806.03476,
  title  = {Type variables in patterns},
  author = {Richard A. Eisenberg and Joachim Breitner and Simon Peyton Jones},
  journal= {arXiv preprint arXiv:1806.03476},
  year   = {2018}
}

Comments

Submitted to Haskell'18