arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.11816cs.PL
收藏

模态效应类型

Modal Effect Types

Wenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström, Sam Lindley, Anton Lorenzen

AI总结:

针对传统效应系统需为现有代码添加大量注解的问题,本研究提出基于模态效应类型的新方法,规避了现有方案依赖脆弱语法机制或引入二等函数的不足。

摘要:

效应处理器是一种用于定义、定制和组合计算效应的强大抽象。要静态确保所有效应操作都得到处理,需要某种形式的效应系统,但使用传统效应系统需要为这些语言中数百万行的现有代码添加大量效应注解。近期的方案试图通过消除显式效应多态性的需求来解决这一问题,但它们通常依赖脆弱的语法机制,或是引入一种独立的二等函数概念。我们提出了一种基于模态效应类型的新方法。

英文摘要:

Effect handlers are a powerful abstraction for defining, customising, and composing computational effects. Statically ensuring that all effect operations are handled requires some form of effect system, but using a traditional effect system would require adding extensive effect annotations to the millions of lines of existing code in these languages. Recent proposals seek to address this problem by removing the need for explicit effect polymorphism. However, they typically rely on fragile syntactic mechanisms or on introducing a separate notion of second-class function. We introduce a novel approach based on modal effect types.

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

↑