pandora-0.3.0: A box of patterns and paradigms

Safe HaskellSafe
LanguageHaskell2010

Pandora.Paradigm.Inventory.Optics

Synopsis

Documentation

type (:-.) src tgt = Lens src tgt infixr 0 Source #

type Lens src tgt = src |-> Store tgt Source #

(|>) :: Lens src old -> Lens old new -> Lens src new Source #

Lens composition infix operator

view :: Lens src tgt -> src -> tgt Source #

Get the target of a lens

(^.) :: Lens src tgt -> src -> tgt Source #

Infix version of view

set :: Lens src tgt -> tgt -> src -> src Source #

Replace the target of a lens

(.~) :: Lens src tgt -> tgt -> src -> src Source #

Infix version of set

over :: Lens src tgt -> (tgt -> tgt) -> src -> src Source #

Modify the target of a lens

(%~) :: Lens src tgt -> (tgt -> tgt) -> src -> src Source #

Infix version of over

zoom :: Stateful bg t => Lens bg ls -> State ls a -> t a Source #