arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2108.13114cs.PL
收藏

嵌入式模式匹配

Embedded Pattern Matching

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

摘要:

Haskell是托管深度嵌入式语言的热门选择。这些嵌入的一个经常性挑战是如何无缝集成用户定义的代数数据类型。特别是,用于创建和检查数据的一个重要的、方便的和富有表现力的特性--模式匹配--在嵌入术语中并不直接可用。我们提出了一种新的技术,嵌入式模式匹配,这使得一个自然的和用户友好的嵌入用户定义的代数数据类型到嵌入式语言,并允许程序员模式匹配的嵌入式语言中的条款,在很大程度上相同的方式,他们会在主机语言。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑