Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data A_Setter :: OpticKind
- type IxSetter i s t a b = Optic A_Setter '[i] s t a b
- type IxSetter' i s a = Optic' A_Setter '[i] s a
- class Functor f => FunctorWithIndex i f | f -> i where
- toIxSetter :: Is k A_Setter => Optic k '[i] s t a b -> IxSetter i s t a b
- iover :: (CheckIndices i is, Is k A_Setter) => Optic k is s t a b -> (i -> a -> b) -> s -> t
- iset :: (CheckIndices i is, Is k A_Setter) => Optic k '[i] s t a b -> (i -> b) -> s -> t
- isets :: ((i -> a -> b) -> s -> t) -> IxSetter i s t a b
- imapped :: FunctorWithIndex i f => IxSetter i (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 |
type IxSetter i s t a b = Optic A_Setter '[i] s t a b #
Type synonym for a type-modifying indexed setter.
class Functor f => FunctorWithIndex i f | f -> i where #
imap :: (i -> a -> b) -> f a -> f b #
imap :: TraversableWithIndex i f => (i -> a -> b) -> f a -> f b #
Instances
toIxSetter :: Is k A_Setter => Optic k '[i] s t a b -> IxSetter i s t a b #
Explicitly cast an optic to an indexeed setter.
iover :: (CheckIndices i is, Is k A_Setter) => Optic k is s t a b -> (i -> a -> b) -> s -> t #
Apply an indexed setter as a modifier.
iset :: (CheckIndices i is, Is k A_Setter) => Optic k '[i] s t a b -> (i -> b) -> s -> t #
Apply an indexed setter.
isets :: ((i -> a -> b) -> s -> t) -> IxSetter i s t a b #
Build an indexed setter from a function to modify the element(s).
imapped :: FunctorWithIndex i f => IxSetter i (f a) (f b) a b #
Indexed setter via the FunctorWithIndex
class.
module Optics.Optic