invertible-0.1: bidirectional arrows, bijective functions, and invariant functors

Safe HaskellSafe
LanguageHaskell2010

Data.Invertible.Either

Description

Bidirectional version of Data.Either.

Synopsis

Documentation

switch :: Either a b <-> Either b a Source

Convert between Left and Right.

isLeft :: Either () () <-> Bool Source

Convert between Left and True (see isLeft).

isRight :: Either () () <-> Bool Source

Convert between Right and True (see isRight). (not . isLeft)

lft :: Either a () <-> Maybe a Source

Convert between Left and Just.

rgt :: Either () a <-> Maybe a Source

Convert between 'Right and Just.