pandora-0.2.9: A box of patterns and paradigms

Safe HaskellSafe
LanguageHaskell2010

Pandora.Paradigm.Inventory.Optics

Synopsis

Documentation

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

type (:-.) src tgt = Lens src tgt infixr 0 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

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

Replace the target of a lens

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

Modify the target of a lens

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

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

Infix version of view

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

Infix version of set

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

Infix version of over