Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal implementation details of indexed optics.
This module is intended for internal use only, and may change without warning in subsequent releases.
Synopsis
- class Functor f => FunctorWithIndex i f | f -> i where
- imap :: (i -> a -> b) -> f a -> f b
- class (FunctorWithIndex i f, Foldable f) => FoldableWithIndex i f | f -> i where
- itraverse_ :: (FoldableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f ()
- ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f ()
- itoList :: FoldableWithIndex i f => f a -> [(i, a)]
- class (FoldableWithIndex i t, Traversable t) => TraversableWithIndex i t | t -> i where
- itraverse :: Applicative f => (i -> a -> f b) -> t a -> f (t b)
- ifor :: (TraversableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f (t b)
Documentation
class Functor f => FunctorWithIndex i f | f -> i where Source #
Class for Functor
s that have an additional read-only index available.
Nothing
imap :: (i -> a -> b) -> f a -> f b Source #
imap :: TraversableWithIndex i f => (i -> a -> b) -> f a -> f b Source #
Instances
class (FunctorWithIndex i f, Foldable f) => FoldableWithIndex i f | f -> i where Source #
Class for Foldable
s that have an additional read-only index available.
Nothing
ifoldMap :: Monoid m => (i -> a -> m) -> f a -> m Source #
ifoldMap :: (TraversableWithIndex i f, Monoid m) => (i -> a -> m) -> f a -> m Source #
Instances
itraverse_ :: (FoldableWithIndex i t, Applicative f) => (i -> a -> f b) -> t a -> f () Source #
Traverse FoldableWithIndex
ignoring the results.
ifor_ :: (FoldableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f () Source #
Flipped itraverse_
.
itoList :: FoldableWithIndex i f => f a -> [(i, a)] Source #
List of elements of a structure with an index, from left to right.
class (FoldableWithIndex i t, Traversable t) => TraversableWithIndex i t | t -> i where Source #
Class for Traversable
s that have an additional read-only index available.
itraverse :: Applicative f => (i -> a -> f b) -> t a -> f (t b) Source #
Instances
ifor :: (TraversableWithIndex i t, Applicative f) => t a -> (i -> a -> f b) -> f (t b) Source #
Flipped itraverse