forked from snoyberg/neither
-
Notifications
You must be signed in to change notification settings - Fork 2
/
neither.cabal
30 lines (28 loc) · 1.66 KB
/
neither.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: neither
version: 0.1.0
license: BSD3
license-file: LICENSE
author: Michael Snoyman <[email protected]>
maintainer: Michael Snoyman <[email protected]>
synopsis: Provide versions of Either with good monad and applicative instances.
description:
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.
category: Data
stability: Stable
cabal-version: >= 1.6
build-type: Simple
homepage: http://github.com/snoyberg/neither
library
build-depends: base >= 4 && < 5,
transformers >= 0.2.1 && < 0.3,
failure >= 0.1.0 && < 0.2
exposed-modules: Data.Neither
Control.Monad.Invert
ghc-options: -Wall
source-repository head
type: git
location: git://github.com/snoyberg/neither.git