split-morphism-0.1.0.1: Split Epimorphisms and Monomorphisms

Control.Lens.Wedge

Synopsis

# Documentation

data Wedge a b Source #

Composition of a SplitMono and a SplitEpi, yielding an even weaker structure where neither reverseGet . get and get . reverseGet is an identity but both are idempotent.

Constructors

 Wedge Fieldsget :: a -> b reverseGet :: b -> a
Instances
 Source # Instance detailsDefined in Control.Lens.Wedge Methodsinvmap :: (a0 -> b) -> (b -> a0) -> Wedge a a0 -> Wedge a b #

normalizeA :: Wedge a b -> a -> a Source #

Normalize a via a round-trip through b.

normalizeB :: Wedge a b -> b -> b Source #

Normalize b via a round-trip through a.

reverse :: Wedge a b -> Wedge b a Source #

Swapping get and reverseGet yields a Wedge.

composeWedge :: Wedge a b -> Wedge b c -> Wedge a c Source #

Compose with another Wedge.

composeIso :: Wedge a b -> Iso' b c -> Wedge a c Source #

Compose with an Iso.

fromIso :: Iso' a b -> Wedge a b Source #

An Isomorphism is trivially a Wedge.