Safe Haskell | Safe-Infered |
---|
Data types similar to Data.Either
that are explicit about failure and success.
- data AccValidation err a
- data Validation err a
- data ValidationT m err a = ValidationT {
- runValidationT :: m (Validation err a)
- class Validate v where
Documentation
data AccValidation err a Source
A value of the type err
or a
, however, the Applicative
instance
accumulates values. This is witnessed by the Semigroup
context on the instance.
Note that there is no @Monad@ such that @ap = (<*>).
Typeable2 AccValidation | |
Bitraversable AccValidation | |
Bifunctor AccValidation | |
Bifoldable AccValidation | |
Validate AccValidation | |
Functor (AccValidation err) | |
Semigroup err => Applicative (AccValidation err) | |
Foldable (AccValidation err) | |
Traversable (AccValidation err) | |
(Semigroup err, Monoid err) => Alternative (AccValidation err) | |
Semigroup err => Alt (AccValidation err) | |
Semigroup err => Apply (AccValidation err) | |
(Eq err, Eq a) => Eq (AccValidation err a) | |
(Data err, Data a) => Data (AccValidation err a) | |
(Ord err, Ord a) => Ord (AccValidation err a) | |
(Show err, Show a) => Show (AccValidation err a) | |
Monoid e => Monoid (AccValidation e a) | |
Semigroup e => Semigroup (AccValidation e a) |
data Validation err a Source
A value of the type err
or a
and isomorphic to Data.Either
.
Typeable2 Validation | |
Bitraversable Validation | |
Bifunctor Validation | |
Bifoldable Validation | |
Validate Validation | |
Monad (Validation err) | |
Functor (Validation err) | |
Applicative (Validation err) | |
Foldable (Validation err) | |
Traversable (Validation err) | |
Monoid err => Alternative (Validation err) | |
Alt (Validation err) | |
Apply (Validation err) | |
Bind (Validation err) | |
(Eq err, Eq a) => Eq (Validation err a) | |
(Data err, Data a) => Data (Validation err a) | |
(Ord err, Ord a) => Ord (Validation err a) | |
(Show err, Show a) => Show (Validation err a) |
data ValidationT m err a Source
The transformer version of Validation
.
ValidationT | |
|
Traversable m => Bitraversable (ValidationT m) | |
Functor m => Bifunctor (ValidationT m) | |
Foldable m => Bifoldable (ValidationT m) | |
Applicative m => Validate (ValidationT m) | |
Monad m => Monad (ValidationT m err) | |
Functor m => Functor (ValidationT m err) | |
Applicative m => Applicative (ValidationT m err) | |
Foldable m => Foldable (ValidationT m err) | |
Traversable m => Traversable (ValidationT m err) | |
(Applicative m, Monad m, Monoid err) => Alternative (ValidationT m err) | |
(Functor m, Monad m) => Alt (ValidationT m err) | |
Apply m => Apply (ValidationT m err) | |
(Apply m, Monad m) => Bind (ValidationT m err) |