neither: Provide versions of Either with good monad and applicative instances. (deprecated)

[ bsd3, data, deprecated, library ] [ Propose Tags ] [ Report a vulnerability ]
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.

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0, 0.0.1, 0.0.2, 0.1.0, 0.2.0, 0.3.0, 0.3.0.1, 0.3.1, 0.3.1.1
Dependencies base (>=4 && <5), failure (>=0.1.0 && <0.2), transformers (>=0.2.1 && <0.3) [details]
License BSD-3-Clause
Author Michael Snoyman <michael@snoyman.com>
Maintainer Michael Snoyman <michael@snoyman.com>
Category Data
Home page http://github.com/snoyberg/neither
Source repo head: git clone git://github.com/snoyberg/neither.git
Uploaded by MichaelSnoyman at 2012-01-18T17:25:15Z
Distributions
Reverse Dependencies 7 direct, 326 indirect [details]
Downloads 6645 total (40 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]