split-morphism-0.1.0.0: Split Epimorphisms and Monomorphisms

Safe HaskellNone
LanguageHaskell2010

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 

Fields

Instances
Invariant (Wedge a) Source # 
Instance details

Defined in Control.Lens.Wedge

Methods

invmap :: (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.