-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Keyed functors and containers -- -- Keyed functors and containers @package keys @version 0.1.0 module Data.Key class Functor f => Keyed f mapWithKey :: Keyed f => (Key f -> a -> b) -> f a -> f b (<#$>) :: Keyed f => (Key f -> a -> b) -> f a -> f b keyed :: Keyed f => f a -> f (Key f, a) apWithKey :: (Keyed f, Applicative f) => f (Key f -> a -> b) -> f a -> f b class Index f index :: Index f => f a -> Key f -> a (!) :: Index f => f a -> Key f -> a class Lookup f lookup :: Lookup f => Key f -> f a -> Maybe a lookupDefault :: Index f => Key f -> f a -> Maybe a class Foldable t => FoldableWithKey t toIndexedList :: FoldableWithKey t => t a -> [(Key t, a)] foldMapWithKey :: (FoldableWithKey t, Monoid m) => (Key t -> a -> m) -> t a -> m foldrWithKey :: FoldableWithKey t => (Key t -> a -> b -> b) -> b -> t a -> b foldlWithKey :: FoldableWithKey t => (b -> Key t -> a -> b) -> b -> t a -> b foldrWithKey' :: FoldableWithKey t => (Key t -> a -> b -> b) -> b -> t a -> b foldlWithKey' :: FoldableWithKey t => (b -> Key t -> a -> b) -> b -> t a -> b foldrWithKeyM :: (FoldableWithKey t, Monad m) => (Key t -> a -> b -> m b) -> b -> t a -> m b foldlWithKeyM :: (FoldableWithKey t, Monad m) => (b -> Key t -> a -> m b) -> b -> t a -> m b traverseWithKey_ :: (FoldableWithKey t, Applicative f) => (Key t -> a -> f b) -> t a -> f () forWithKey_ :: (FoldableWithKey t, Applicative f) => t a -> (Key t -> a -> f b) -> f () mapWithKeyM_ :: (FoldableWithKey t, Monad m) => (Key t -> a -> m b) -> t a -> m () forWithKeyM_ :: (FoldableWithKey t, Monad m) => t a -> (Key t -> a -> m b) -> m () concatMapWithKey :: FoldableWithKey t => (Key t -> a -> [b]) -> t a -> [b] anyWithKey :: FoldableWithKey t => (Key t -> a -> Bool) -> t a -> Bool allWithKey :: FoldableWithKey t => (Key t -> a -> Bool) -> t a -> Bool findWithKey :: FoldableWithKey t => (Key t -> a -> Bool) -> t a -> Maybe a class (Foldable1 t, FoldableWithKey t) => FoldableWithKey1 t foldMapWithKey1 :: (FoldableWithKey1 t, Semigroup m) => (Key t -> a -> m) -> t a -> m traverseWithKey1_ :: (FoldableWithKey1 t, Apply f) => (Key t -> a -> f b) -> t a -> f () forWithKey1_ :: (FoldableWithKey1 t, Apply f) => t a -> (Key t -> a -> f b) -> f () foldMapWithKeyDefault1 :: (FoldableWithKey1 t, Monoid m) => (Key t -> a -> m) -> t a -> m class (Keyed t, FoldableWithKey t, Traversable t) => TraversableWithKey t traverseWithKey :: (TraversableWithKey t, Applicative f) => (Key t -> a -> f b) -> t a -> f (t b) mapWithKeyM :: (TraversableWithKey t, Monad m) => (Key t -> a -> m b) -> t a -> m (t b) forWithKey :: (TraversableWithKey t, Applicative f) => t a -> (Key t -> a -> f b) -> f (t b) forWithKeyM :: (TraversableWithKey t, Monad m) => t a -> (Key t -> a -> m b) -> m (t b) -- | The mapAccumWithKeyL function behaves like a combination of -- mapWithKey and foldlWithKey; it applies a function to -- each element of a structure, passing an accumulating parameter from -- left to right, and returning a final value of this accumulator -- together with the new structure. mapAccumWithKeyL :: TraversableWithKey t => (Key t -> a -> b -> (a, c)) -> a -> t b -> (a, t c) -- | The mapAccumWithKeyR function behaves like a combination of -- mapWithKey and foldrWithKey; it applies a function to -- each element of a structure, passing an accumulating parameter from -- right to left, and returning a final value of this accumulator -- together with the new structure. mapAccumWithKeyR :: TraversableWithKey t => (Key t -> a -> b -> (a, c)) -> a -> t b -> (a, t c) mapWithKeyDefault :: TraversableWithKey t => (Key t -> a -> b) -> t a -> t b -- | This function may be used as a value for -- Data.Foldable.foldMapWithKey in a FoldableWithKey -- instance. foldMapWithKeyDefault :: (TraversableWithKey t, Monoid m) => (Key t -> a -> m) -> t a -> m class (Traversable1 t, FoldableWithKey1 t, TraversableWithKey t) => TraversableWithKey1 t traverseWithKey1 :: (TraversableWithKey1 t, Apply f) => (Key t -> a -> f b) -> t a -> f (t b) foldMapWithKey1Default :: (TraversableWithKey1 t, Semigroup m) => (Key t -> a -> m) -> t a -> m instance Ix i => TraversableWithKey (Array i) instance Ix i => FoldableWithKey (Array i) instance Ix i => Lookup (Array i) instance Ix i => Index (Array i) instance Ix i => Keyed (Array i) instance TraversableWithKey (Map k) instance FoldableWithKey (Map k) instance Ord k => Lookup (Map k) instance Ord k => Index (Map k) instance Keyed (Map k) instance TraversableWithKey Seq instance FoldableWithKey Seq instance Keyed Seq instance Lookup Seq instance Index Seq instance Lookup [] instance Index [] instance TraversableWithKey [] instance FoldableWithKey [] instance Keyed [] instance (TraversableWithKey1 f, TraversableWithKey1 m) => TraversableWithKey1 (Compose f m) instance (TraversableWithKey f, TraversableWithKey m) => TraversableWithKey (Compose f m) instance (FoldableWithKey1 f, FoldableWithKey1 m) => FoldableWithKey1 (Compose f m) instance (FoldableWithKey f, FoldableWithKey m) => FoldableWithKey (Compose f m) instance (Lookup f, Lookup g) => Lookup (Compose f g) instance (Index f, Index g) => Index (Compose f g) instance (Keyed f, Keyed g) => Keyed (Compose f g) instance Lookup IntMap instance Index IntMap instance TraversableWithKey IntMap instance FoldableWithKey IntMap instance Keyed IntMap instance Lookup w => Lookup (TracedT s w) instance Index w => Index (TracedT s w) instance Keyed w => Keyed (TracedT s w) instance Lookup m => Lookup (ReaderT e m) instance Index m => Index (ReaderT e m) instance Keyed m => Keyed (ReaderT e m) instance Lookup ((->) a) instance Index ((->) a) instance Keyed ((->) a) instance TraversableWithKey1 m => TraversableWithKey1 (IdentityT m) instance TraversableWithKey m => TraversableWithKey (IdentityT m) instance FoldableWithKey1 m => FoldableWithKey1 (IdentityT m) instance FoldableWithKey m => FoldableWithKey (IdentityT m) instance Keyed m => Keyed (IdentityT m) instance Lookup m => Lookup (IdentityT m) instance Index m => Index (IdentityT m) instance TraversableWithKey1 Identity instance TraversableWithKey Identity instance FoldableWithKey1 Identity instance FoldableWithKey Identity instance Keyed Identity instance Lookup Identity instance Index Identity instance Applicative (StateR s) instance Functor (StateR s) instance Applicative (StateL s) instance Functor (StateL s) instance Functor f => Functor (Act f) instance Apply f => Semigroup (Act f a)