What's the current status of restricted monads?

拜拜、爱过 提交于 2019-11-30 06:00:01

There's a recent paper by Anders Persson, Emil Axelsson, and Josef Svenningson that shows a way to encode restricted monads. I've forgotten the details, but I remember it was a nice paper.

Persson, A. ; Axelsson, E. ; Svenningsson, J. (2011). Generic monadic constructs for embedded languages. IFL 2011, the 23rd Symposium on Implementation and Application of Functional Languages.

Actually it is possible to obtain an efficient Set monad as a regular monad, without any restrictions. In two distinct ways. The following article explains both:

http://okmij.org/ftp/Haskell/set-monad.html

The article also points out that restricted monads are actually quite restricted and preclude many monadic idioms. I conjecture that the implementation methods are general and any restricted monad can be turned into the usual one, without losing efficiency. So, it may seem that we don't need restricted monads at all.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!