optics-extra-0.2: Extra utilities and instances for optics-core

Safe HaskellNone
LanguageHaskell2010

Optics.Passthrough

Documentation

class (Is k A_Traversal, ViewableOptic k r) => PermeableOptic k r where Source #

Methods

passthrough :: Optic k is s t a b -> (a -> (r, b)) -> s -> (ViewResult k r, t) Source #

Modify the target of an Optic returning extra information of type r.

Instances
PermeableOptic An_Iso r Source # 
Instance details

Defined in Optics.Passthrough

Methods

passthrough :: Optic An_Iso is s t a b -> (a -> (r, b)) -> s -> (ViewResult An_Iso r, t) Source #

PermeableOptic A_Lens r Source # 
Instance details

Defined in Optics.Passthrough

Methods

passthrough :: Optic A_Lens is s t a b -> (a -> (r, b)) -> s -> (ViewResult A_Lens r, t) Source #

PermeableOptic A_Prism r Source # 
Instance details

Defined in Optics.Passthrough

Methods

passthrough :: Optic A_Prism is s t a b -> (a -> (r, b)) -> s -> (ViewResult A_Prism r, t) Source #

PermeableOptic An_AffineTraversal r Source # 
Instance details

Defined in Optics.Passthrough

Methods

passthrough :: Optic An_AffineTraversal is s t a b -> (a -> (r, b)) -> s -> (ViewResult An_AffineTraversal r, t) Source #

Monoid r => PermeableOptic A_Traversal r Source # 
Instance details

Defined in Optics.Passthrough

Methods

passthrough :: Optic A_Traversal is s t a b -> (a -> (r, b)) -> s -> (ViewResult A_Traversal r, t) Source #