Do Be Do Be Do
Do be do be do
摘要:
我们探讨的设计和实施的弗兰克,一个严格的功能性程序设计语言的双向效果类型系统设计从地面上围绕一个新的变种Plotkin和Pretnar的效果处理抽象。效果处理程序为模块化有效编程提供了一个抽象:处理程序充当命令集合的解释器,这些命令的接口由类型系统静态跟踪。然而,Frank通过概括函数抽象本身的基本机制,消除了对额外效果处理构造的需要。函数只是不解释任何命令的Frank运算符的特殊情况。此外,Frank的操作符可以是多处理程序,可以同时解释来自多个源的命令,而不会干扰函数式编程的直接风格。Frank中的效应类型采用了一种新颖的效应多态形式,避免在源代码中提及效应变量。这是通过向内传播环境异能来实现的,而不是向外累积潜在效果的联合。我们介绍弗兰克的例子,然后给出一个正式的帐户弗兰克类型系统及其语义。我们通过将Frank操作符细化到函数、case表达式和一元处理程序中来引入Core Frank,然后为Core Frank给出一个合理的小步操作语义。使用效果和处理程序进行编程还处于起步阶段。我们对未来的可能性进行了探索,特别是与其他形式的丰富类型系统相结合。
英文摘要:
We explore the design and implementation of Frank, a strict functional programming language with a bidirectional effect type system designed from the ground up around a novel variant of Plotkin and Pretnar's effect handler abstraction. Effect handlers provide an abstraction for modular effectful programming: a handler acts as an interpreter for a collection of commands whose interfaces are statically tracked by the type system. However, Frank eliminates the need for an additional effect handling construct by generalising the basic mechanism of functional abstraction itself. A function is simply the special case of a Frank operator that interprets no commands. Moreover, Frank's operators can be multihandlers which simultaneously interpret commands from several sources at once, without disturbing the direct style of functional programming with values. Effect typing in Frank employs a novel form of effect polymorphism which avoid mentioning effect variables in source code. This is achieved by propagating an ambient ability inwards, rather than accumulating unions of potential effects outwards. We introduce Frank by example, and then give a formal account of the Frank type system and its semantics. We introduce Core Frank by elaborating Frank operators into functions, case expressions, and unary handlers, and then give a sound small-step operational semantics for Core Frank. Programming with effects and handlers is in its infancy. We contribute an exploration of future possibilities, particularly in combination with other forms of rich type system.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。