Moduleoptics-extra-0.4.2.1Haskell2010
Optics.State.Operators
Defines infix operators for the operations in Optics.State. These
operators are not exposed by the main Optics module, but must be imported
explicitly.
- 1 class
- 10 values
- Packageoptics-extra-0.4.2.1
- Exports11
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceOperators.hs
State modifying optics
3 declarationsState modifying optics with passthrough
1 declarationModify the target of an PermeableOptic in the current state returning
some extra information of type depending on the optic (r, Maybe r or
monoidal summary).
Returning new value
3 declarationsSet with pass-through.
This is useful for chaining assignment without round-tripping through your Monad stack.
Modify the target of a PermeableOptic into your Monad's state by a user
supplied function and return the result.
Returning old value
3 declarationsReplace the target of a PermeableOptic into your Monad's state with a
user supplied value and return the old value that was replaced.
Replace the target of a PermeableOptic into your Monad's state with
Just a user supplied value and return the old value that was replaced.
Modify the target of a PermeableOptic into your Monad's state by a user
supplied function and return the old value that was replaced.
Passthrough
1 declarationMethods
passthrough :: Optic k is s t a b -> (a -> (r, b)) -> s -> (ViewResult k r, t)Modify the target of an Optic returning extra information of type
r.
Instances5PermeableOptic
Monoid r => PermeableOptic A_Traversal rDefined in optics-extra-0.4.2.1 · Optics.PassthroughPermeableOptic A_Lens rDefined in optics-extra-0.4.2.1 · Optics.PassthroughPermeableOptic A_Prism rDefined in optics-extra-0.4.2.1 · Optics.PassthroughPermeableOptic An_AffineTraversal rDefined in optics-extra-0.4.2.1 · Optics.PassthroughPermeableOptic An_Iso rDefined in optics-extra-0.4.2.1 · Optics.Passthrough