Desugaring Haskell's do-notation into applicative operations

Desugaring Haskell's do-notation into applicative operations
复制标题

将 Haskell 的 do-notation 脱糖为应用操作

DOI:
10.1145/2976002.2976007
复制
发表时间:
2016
期刊:
Proceedings of the 9th International Symposium on Haskell
影响因子:
--
通讯作者:
A. Mokhov
A. Mokhov
中科院分区:
--
文献类型:
--
作者:
S. Marlow;S. Jones;Edward Kmett;A. Mokhov

文献摘要

参考文献

被引文献

相似文献

Monad已经席卷了世界,并得到了do-notation(至少在Haskell中)的支持。程序员越来越多地意识到应用程序的实用性和无处不在,但到目前为止,他们一直受到缺乏支持符号的阻碍。在这篇文章中,我们展示了如何重新使用完全相同的do-notation来为应用程序工作,为一些既是Monad又是应用程序的类型提供了效率优势,并为那些仅仅是应用程序的类型提供了语法上的便利。结果在GHC中完全实现为可选扩展,并在Facebook上使用,以便于在分布式系统中编写高度并行的查询。
Monads have taken the world by storm, and are supported by do-notation (at least in Haskell). Programmers are increasingly waking up to the usefulness and ubiquity of Applicatives, but they have so far been hampered by the absence of supporting notation. In this paper we show how to re-use the very same do-notation to work for Applicatives as well, providing efficiency benefits for some types that are both Monad and Applicative, and syntactic convenience for those that are merely Applicative. The result is fully implemented as an optional extension in GHC, and is in use at Facebook to make it easy to write highly-parallel queries in a distributed system.
习语和箭头的代数效应和效果处理程序
DOI: 10.1145/2633628.2633636
发表时间: 2014
期刊: --
影响因子: --
作者:
Lindley S
通讯作者: Lindley S