| Copyright | ©2020 James Alexander Feldman-Crough |
|---|---|
| License | MPL-2.0 |
| Maintainer | alex@fldcr.com |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Data.Either.Valid
Description
Documentation
Like the Either type, but its instances accumulates its errors. As such,
there is no Monad instance for Valid.
The Invalid constructor takes precedence over Valid when used with
classes that combine two values.
Note: There are a lot of packages that implement this data type, but finding a well-maintained one with minimal dependencies proved difficult.
Instances
| Bifunctor Valid Source # | |
| Functor (Valid e) Source # | |
| Semigroup e => Applicative (Valid e) Source # | |
| Monoid e => Alternative (Valid e) Source # | |
| (Eq e, Eq a) => Eq (Valid e a) Source # | |
| (Ord e, Ord a) => Ord (Valid e a) Source # | |
| (Show e, Show a) => Show (Valid e a) Source # | |
| (Semigroup e, Semigroup a) => Semigroup (Valid e a) Source # | |
| (Semigroup e, Monoid a) => Monoid (Valid e a) Source # | |