indexed-traversable-instances-0.1: More instances of FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Functor.WithIndex.Instances

Description

Extra instances for FunctorWithIndex, FoldableWithIndex, and TraversableWithIndex type classes.

Orphan instances

FunctorWithIndex Int Vector Source # 
Instance details

Methods

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

FoldableWithIndex Int Vector Source # 
Instance details

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> Vector a -> m #

ifoldMap' :: Monoid m => (Int -> a -> m) -> Vector a -> m #

ifoldr :: (Int -> a -> b -> b) -> b -> Vector a -> b #

ifoldl :: (Int -> b -> a -> b) -> b -> Vector a -> b #

ifoldr' :: (Int -> a -> b -> b) -> b -> Vector a -> b #

ifoldl' :: (Int -> b -> a -> b) -> b -> Vector a -> b #

TraversableWithIndex Int Vector Source # 
Instance details

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> Vector a -> f (Vector b) #

FunctorWithIndex k (HashMap k) Source # 
Instance details

Methods

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

FoldableWithIndex k (HashMap k) Source # 
Instance details

Methods

ifoldMap :: Monoid m => (k -> a -> m) -> HashMap k a -> m #

ifoldMap' :: Monoid m => (k -> a -> m) -> HashMap k a -> m #

ifoldr :: (k -> a -> b -> b) -> b -> HashMap k a -> b #

ifoldl :: (k -> b -> a -> b) -> b -> HashMap k a -> b #

ifoldr' :: (k -> a -> b -> b) -> b -> HashMap k a -> b #

ifoldl' :: (k -> b -> a -> b) -> b -> HashMap k a -> b #

TraversableWithIndex k (HashMap k) Source # 
Instance details

Methods

itraverse :: Applicative f => (k -> a -> f b) -> HashMap k a -> f (HashMap k b) #

FunctorWithIndex () (Tagged a) Source # 
Instance details

Methods

imap :: (() -> a0 -> b) -> Tagged a a0 -> Tagged a b #

FoldableWithIndex () (Tagged a) Source # 
Instance details

Methods

ifoldMap :: Monoid m => (() -> a0 -> m) -> Tagged a a0 -> m #

ifoldMap' :: Monoid m => (() -> a0 -> m) -> Tagged a a0 -> m #

ifoldr :: (() -> a0 -> b -> b) -> b -> Tagged a a0 -> b #

ifoldl :: (() -> b -> a0 -> b) -> b -> Tagged a a0 -> b #

ifoldr' :: (() -> a0 -> b -> b) -> b -> Tagged a a0 -> b #

ifoldl' :: (() -> b -> a0 -> b) -> b -> Tagged a a0 -> b #

TraversableWithIndex () (Tagged a) Source # 
Instance details

Methods

itraverse :: Applicative f => (() -> a0 -> f b) -> Tagged a a0 -> f (Tagged a b) #