Embedded pattern matching

Trevor L. McDonell, Joshua D. Meredith, Gabriele Keller

    Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

    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. 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.
    Original languageEnglish
    Title of host publicationHaskell 2022: Proceedings of the 15th ACM SIGPLAN International Haskell Symposium
    PublisherAssociation for Computing Machinery
    Pages123-136
    Number of pages14
    ISBN (Print)978-1-4503-9438
    DOIs
    Publication statusPublished - 2022

    Bibliographical note

    DBLP License: DBLP's bibliographic metadata records provided through http://dblp.org/ are distributed under a Creative Commons CC0 1.0 Universal Public Domain Dedication. Although the bibliographic metadata records are provided consistent with CC0 1.0 Dedication, the content described by the metadata records is not. Content may be subject to copyright, rights of privacy, rights of publicity and other restrictions.

    Keywords

    • Haskell
    • pattern matching
    • algebraic data types
    • embedded languages

    Fingerprint

    Dive into the research topics of 'Embedded pattern matching'. Together they form a unique fingerprint.

    Cite this