Embedded Pattern Matching

Trevor L. McDonell, Joshua D. Meredith, Gabriele Keller
8/30/2021
cs.PL

Official code: tmcdonell/embedded-pattern-matching (7 stars, Haskell, MIT, last commit 2022-09-15).

Abstract

Haskell is a popular choice for hosting deeply embedded languages. A recurring challenge for these embeddings is how to seamlessly integrate user defined algebraic data types.

Show full abstract

In particular, one important, convenient, and expressive feature for creating and inspecting data -- pattern matching -- is not directly available on embedded terms. We present a novel technique, embedded pattern matching, which enables a natural and user friendly embedding of user defined algebraic data types into the embedded language, and allows programmers to pattern match on terms in the embedded language in much the same way they would in the host language.

View on arXivView PDF

Code Implementations(1)

MIT

A language to demonstrate embedded pattern matching

74Haskell, ScalaSep 30, 20204 years agoMIT

Similar Papers

Cite this paper

@article{mcdonell2021embedded,
  title  = {Embedded Pattern Matching},
  author = {Trevor L. McDonell and Joshua D. Meredith and Gabriele Keller},
  year   = {2021},
  eprint = {2108.13114},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.13114}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2108.13114.svg)](https://codeofpaper.com/paper/2108.13114)

Discussion