Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data A_Setter :: OpticKind
- type Setter s t a b = Optic A_Setter '[] s t a b
- type Setter' s a = Optic' A_Setter '[] s a
- toSetter :: Is k A_Setter => Optic k is s t a b -> Optic A_Setter is s t a b
- over :: Is k A_Setter => Optic k is s t a b -> (a -> b) -> s -> t
- set :: Is k A_Setter => Optic k is s t a b -> b -> s -> t
- sets :: ((a -> b) -> s -> t) -> Setter s t a b
- mapped :: Functor f => Setter (f a) (f b) a b
- module Optics.Optic
Documentation
Tag for a setter.
Instances
UnindexableOptic A_Setter # | |
Is A_Traversal A_Setter # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy A_Traversal A_Setter p -> (Constraints A_Traversal p -> r) -> Constraints A_Setter p -> r | |
Is An_AffineTraversal A_Setter # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy An_AffineTraversal A_Setter p -> (Constraints An_AffineTraversal p -> r) -> Constraints A_Setter p -> r | |
Is A_Prism A_Setter # | |
Is A_Lens A_Setter # | |
Is An_Iso A_Setter # | |
Is An_Equality A_Setter # | |
Defined in Optics.Internal.Optic.Subtyping implies :: proxy An_Equality A_Setter p -> (Constraints An_Equality p -> r) -> Constraints A_Setter p -> r |
toSetter :: Is k A_Setter => Optic k is s t a b -> Optic A_Setter is s t a b #
Explicitly cast an optic to a setter.
set :: Is k A_Setter => Optic k is s t a b -> b -> s -> t #
Apply a setter.
>>>
set _1 'x' ('y', 'z')
('x','z')
sets :: ((a -> b) -> s -> t) -> Setter s t a b #
Build a setter from a function to modify the element(s).
module Optics.Optic