logo
首页技术栈工具库讨论
neither

neither

Deprecated in favor of either, monad-control The standard Either datatype suffers from a lack of monad and applicative instances. To make matters worse, the mtl and transformers packages provide orphan instances which conflict with each other, as well as defining a transformer version which has an usually unnecessary superclass constraint. Besides these annoyances, there is another issue: there exist two reasonable definitions of the Applicative instance for Either: one the holds onto only the first Left value, or one that appends all Left values together via a Monoid instance. The former is compatible with the monad instance, while the latter is not. This package defines three datatypes, some helpers functions and instances. The data types are AEither, MEither and MEitherT. AEither provides an Applicative instance which appends Left values, MEither provides the monadic definition, and MEitherT is a monad transformer.
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
GitHub iconsnoyberg/neither4
HACKAGE
carbal install neither
查看
标签
根据用户添加的标签生成
暂无标签