TL;DR
This paper introduces embedded pattern matching, a technique that allows seamless and natural pattern matching on user-defined algebraic data types within embedded languages like Haskell, enhancing expressiveness and usability.
Contribution
It presents a novel method for embedding pattern matching in deeply embedded languages, enabling more natural manipulation of user-defined data types.
Findings
Enables pattern matching on embedded algebraic data types
Improves expressiveness of embedded languages
Facilitates easier data inspection and manipulation
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
