optics-core-0.1

Safe HaskellNone
LanguageHaskell2010

Optics.IxSetter

Synopsis

Documentation

data A_Setter :: OpticKind #

Tag for a setter.

Instances
UnindexableOptic A_Setter # 
Instance details

Defined in Optics.Unindexed

Methods

unIx :: CheckIndices i is => Optic A_Setter is s t a b -> Optic A_Setter [] s t a b #

Is A_Traversal A_Setter # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Traversal A_Setter p -> (Constraints A_Traversal p -> r) -> Constraints A_Setter p -> r

Is An_AffineTraversal A_Setter # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_AffineTraversal A_Setter p -> (Constraints An_AffineTraversal p -> r) -> Constraints A_Setter p -> r

Is A_Prism A_Setter # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Prism A_Setter p -> (Constraints A_Prism p -> r) -> Constraints A_Setter p -> r

Is A_Lens A_Setter # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy A_Lens A_Setter p -> (Constraints A_Lens p -> r) -> Constraints A_Setter p -> r

Is An_Iso A_Setter # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

implies :: proxy An_Iso A_Setter p -> (Constraints An_Iso p -> r) -> Constraints A_Setter p -> r

Is An_Equality A_Setter # 
Instance details

Defined in Optics.Internal.Optic.Subtyping

Methods

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.

type IxSetter' i s a = Optic' A_Setter '[i] s a #

Type synonym for a type-preserving indexed setter.

class Functor f => FunctorWithIndex i f | f -> i where #

Methods

imap :: (i -> a -> b) -> f a -> f b #

imap :: TraversableWithIndex i f => (i -> a -> b) -> f a -> f b #

Instances
FunctorWithIndex Int [] # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Int -> a -> b) -> [a] -> [b] #

FunctorWithIndex Int ZipList # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Int -> a -> b) -> ZipList a -> ZipList b #

FunctorWithIndex Int NonEmpty # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Int -> a -> b) -> NonEmpty a -> NonEmpty b #

FunctorWithIndex Int IntMap # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Int -> a -> b) -> IntMap a -> IntMap b #

FunctorWithIndex Int Seq #

The position in the Seq is available as the index.

Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Int -> a -> b) -> Seq a -> Seq b #

FunctorWithIndex () Maybe # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (() -> a -> b) -> Maybe a -> Maybe b #

FunctorWithIndex () Par1 # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (() -> a -> b) -> Par1 a -> Par1 b #

FunctorWithIndex () Identity # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (() -> a -> b) -> Identity a -> Identity b #

Ix i => FunctorWithIndex i (Array i) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (i -> a -> b) -> Array i a -> Array i b #

FunctorWithIndex k (Map k) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (k -> a -> b) -> Map k a -> Map k b #

FunctorWithIndex k ((,) k) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (k -> a -> b) -> (k, a) -> (k, b) #

FunctorWithIndex Void (V1 :: * -> *) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Void -> a -> b) -> V1 a -> V1 b #

FunctorWithIndex Void (U1 :: * -> *) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Void -> a -> b) -> U1 a -> U1 b #

FunctorWithIndex Void (Proxy :: * -> *) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Void -> a -> b) -> Proxy a -> Proxy b #

FunctorWithIndex i f => FunctorWithIndex i (Rec1 f) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (i -> a -> b) -> Rec1 f a -> Rec1 f b #

FunctorWithIndex i m => FunctorWithIndex i (IdentityT m) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (i -> a -> b) -> IdentityT m a -> IdentityT m b #

FunctorWithIndex i f => FunctorWithIndex i (Reverse f) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (i -> a -> b) -> Reverse f a -> Reverse f b #

FunctorWithIndex i f => FunctorWithIndex i (Backwards f) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (i -> a -> b) -> Backwards f a -> Backwards f b #

FunctorWithIndex r ((->) r :: * -> *) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (r -> a -> b) -> (r -> a) -> r -> b #

FunctorWithIndex Void (K1 i c :: * -> *) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Void -> a -> b) -> K1 i c a -> K1 i c b #

FunctorWithIndex [Int] Tree # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: ([Int] -> a -> b) -> Tree a -> Tree b #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (f :+: g) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Either i j -> a -> b) -> (f :+: g) a -> (f :+: g) b #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (f :*: g) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Either i j -> a -> b) -> (f :*: g) a -> (f :*: g) b #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (Product f g) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Either i j -> a -> b) -> Product f g a -> Product f g b #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (Either i j) (Sum f g) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: (Either i j -> a -> b) -> Sum f g a -> Sum f g b #

FunctorWithIndex i m => FunctorWithIndex (e, i) (ReaderT e m) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: ((e, i) -> a -> b) -> ReaderT e m a -> ReaderT e m b #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (i, j) (f :.: g) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: ((i, j) -> a -> b) -> (f :.: g) a -> (f :.: g) b #

(FunctorWithIndex i f, FunctorWithIndex j g) => FunctorWithIndex (i, j) (Compose f g) # 
Instance details

Defined in Optics.Internal.Indexed

Methods

imap :: ((i, j) -> a -> b) -> Compose f g a -> Compose f g b #

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.