What's the current status of restricted monads?

前端 未结 2 1007
时光说笑
时光说笑 2020-12-29 22:32

Going back to at least the late 1990s there have been people wishing for the integration of restricted monads into Haskell in a friendly way.

For example, without re

2条回答
  •  没有蜡笔的小新
    2020-12-29 23:11

    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.

提交回复
热议问题