函数编程 – “Monad变压器比效果更强大” – 例子?

关于Idris的影响的文件“Programming and reasoning with algebraic effects and dependent types” by Edwin C. Brady包含(未引用的)权利要求:

Although [effects and monad transformers] are not equivalent in power — monads and monad transformers can express more concepts — many common effectful computations are captured.

有什么例子可以由monad变压器建模,但不是效果?

继续可以被建模为单子,使用CPS,但是它们不是代数效应,因为它们不能使用Lawvere理论建模。参见Martin Hyland和John Power,2007,The Category Theoretic Understanding of Universal Algebra: Lawvere Theories and Monads (pdf),ENTCS 172:437-458。
http://stackoverflow.com/questions/31335805/monad-transformers-more-powerful-than-effects-examples

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:函数编程 – “Monad变压器比效果更强大” – 例子?