profunctor-optics-0.0.2: A compact optics library compatible with the typeclasses in profunctors.

Safe HaskellNone
LanguageHaskell2010

Data.Either.Optic

Synopsis

Documentation

coswapped :: Iso (a + b) (c + d) (b + a) (d + c) Source #

Swap sides of a sum.

coassociated :: Iso (a + (b + c)) (d + (e + f)) ((a + b) + c) ((d + e) + f) Source #

Iso defined by left-association of nested tuples.

left :: Prism (a + c) (b + c) a b Source #

Prism into the Left constructor of Either.

right :: Prism (c + a) (c + b) a b Source #

Prism into the Right constructor of Either.