Data.Either
lib/Data/Either.gob
No module comment.
type Either l r
= Left(l)
| Right(r)
fun isRight : fun(Either l r) -> Bool
fun left : fun(Either l r) -> Option l
The one side, with the other forgotten.
fun right : fun(Either l r) -> Option r
fun unwrapOr : fun(Either l r, r) -> r
fun map : fun(Either l a, fun(a) -> b) -> Either l b
fun mapLeft : fun(Either l r, fun(l) -> m) -> Either m r
The left half of bimap, named for what it maps rather than for what a
Left is assumed to mean. Either is not Result: a Left is the other
case, not a failure, so this is mapLeft and not mapError. Promoting an
error into the shared channel is Data.Error.promote, which is this
function applied to fail.
fun fold : fun(Either l r, fun(l) -> a, fun(r) -> a) -> a
instance Functor (Either l)
instance Bifunctor Either
instance Applicative (Either l)
instance Monad (Either l)
instance Show (Either l r) : Debug l, Debug r
What its Debug prints: a container's text shows its elements' Debug,
so that a string in it is quoted.