mono-traversable-keys-0.1.0: Type-classes for interacting with monomorphic containers with a key

Safe HaskellNone
LanguageHaskell2010

Data.MonoTraversable.Keys

Contents

Description

Type-classes mirroring type-classes from Key, but working with monomorphic containers.

The motivation is that some commonly used data types (i.e., ByteString and Text) do not allow for instances of type-classes like Keyed, Indexable, and FoldableWithKey, since they are monomorphic structures. This module allows both monomorphic and polymorphic data types to be instances of the same type-classes.

All of the laws for the polymorphic type-classes apply to their monomorphic cousins.

Note that all type-classes have been prefixed with Mono, and functions have been prefixed with o. The mnemonic is inherited from MonoTraversable.

Synopsis

Documentation

type family MonoKey key Source #

Type family for getting the type of the key of a monomorphic container.

Instances

type MonoKey ByteString Source # 
type MonoKey ByteString Source # 
type MonoKey IntSet Source # 
type MonoKey Text Source # 
type MonoKey Text Source # 
type MonoKey [a] Source # 
type MonoKey [a] = Int
type MonoKey (Maybe a) Source # 
type MonoKey (Maybe a) = ()
type MonoKey (IO a) Source # 
type MonoKey (IO a) = ()
type MonoKey (Option a) Source # 
type MonoKey (Option a) = ()
type MonoKey (NonEmpty a) Source # 
type MonoKey (NonEmpty a) = Int
type MonoKey (ZipList a) Source # 
type MonoKey (ZipList a) = Int
type MonoKey (Identity a) Source # 
type MonoKey (Identity a) = ()
type MonoKey (IntMap a) Source # 
type MonoKey (IntMap a) = Int
type MonoKey (Tree a) Source # 
type MonoKey (Tree a) = Seq Int
type MonoKey (Seq a) Source # 
type MonoKey (Seq a) = Int
type MonoKey (ViewL a) Source # 
type MonoKey (ViewL a) = ()
type MonoKey (ViewR a) Source # 
type MonoKey (ViewR a) = ()
type MonoKey (Set e) Source # 
type MonoKey (Set e) = Int
type MonoKey (HashSet e) Source # 
type MonoKey (HashSet e) = Int
type MonoKey (Vector a) Source # 
type MonoKey (Vector a) = Int
type MonoKey (Vector a) Source # 
type MonoKey (Vector a) = Int
type MonoKey (Vector a) Source # 
type MonoKey (Vector a) = Int
type MonoKey (r -> a) Source # 
type MonoKey (r -> a) = ()
type MonoKey (Either a b) Source # 
type MonoKey (Either a b) = ()
type MonoKey (a, b) Source # 
type MonoKey (a, b) = ()
type MonoKey (Arg a b) Source # 
type MonoKey (Arg a b) = ()
type MonoKey (WrappedMonad m a) Source # 
type MonoKey (WrappedMonad m a) = ()
type MonoKey (Map k v) Source # 
type MonoKey (Map k v) = k
type MonoKey (MaybeT m a) Source # 
type MonoKey (MaybeT m a) = ()
type MonoKey (ListT m a) Source # 
type MonoKey (ListT m a) = Int
type MonoKey (HashMap k v) Source # 
type MonoKey (HashMap k v) = k
type MonoKey (WrappedArrow a b c) Source # 
type MonoKey (WrappedArrow a b c) = ()
type MonoKey (Const * m a) Source # 
type MonoKey (Const * m a) = ()
type MonoKey (IdentityT * m a) Source # 
type MonoKey (IdentityT * m a) = ()
type MonoKey (StateT s m a) Source # 
type MonoKey (StateT s m a) = ()
type MonoKey (StateT s m a) Source # 
type MonoKey (StateT s m a) = ()
type MonoKey (WriterT w m a) Source # 
type MonoKey (WriterT w m a) = ()
type MonoKey (WriterT w m a) Source # 
type MonoKey (WriterT w m a) = ()
type MonoKey (Product * f g a) Source # 
type MonoKey (Product * f g a) = Either (Key f) (Key g)
type MonoKey (ContT * r m a) Source # 
type MonoKey (ContT * r m a) = ()
type MonoKey (ReaderT * r m a) Source # 
type MonoKey (ReaderT * r m a) = (r, Key m)
type MonoKey (Compose * * f g a) Source # 
type MonoKey (Compose * * f g a) = (MonoKey (f a), MonoKey (g a))
type MonoKey (RWST r w s m a) Source # 
type MonoKey (RWST r w s m a) = ()
type MonoKey (RWST r w s m a) Source # 
type MonoKey (RWST r w s m a) = ()

Keyed Monomorphic Structures

class MonoFunctor mono => MonoKeyed mono where Source #

Monomorphic containers that can be mapped over.

Methods

omapWithKey :: (MonoKey mono -> Element mono -> Element mono) -> mono -> mono Source #

Map over a monomorphic container

omapWithKey :: (Keyed f, Element (f a) ~ a, MonoKey (f a) ~ Key f, f a ~ mono) => (MonoKey mono -> Element mono -> Element mono) -> mono -> mono Source #

Map over a monomorphic container

Instances

MonoKeyed ByteString Source #

Since: 0.1.0

MonoKeyed ByteString Source #

Since: 0.1.0

MonoKeyed Text Source #

Since: 0.1.0

MonoKeyed Text Source #

Since: 0.1.0

MonoKeyed [a] Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey [a] -> Element [a] -> Element [a]) -> [a] -> [a] Source #

MonoKeyed (Maybe a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Maybe a Source #

MonoKeyed (IO a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (IO a) -> Element (IO a) -> Element (IO a)) -> IO a -> IO a Source #

MonoKeyed (Option a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Option a) -> Element (Option a) -> Element (Option a)) -> Option a -> Option a Source #

MonoKeyed (NonEmpty a) Source #

Since: 0.1.0

MonoKeyed (ZipList a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (ZipList a) -> Element (ZipList a) -> Element (ZipList a)) -> ZipList a -> ZipList a Source #

MonoKeyed (Identity a) Source #

Since: 0.1.0

MonoKeyed (IntMap a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> IntMap a Source #

MonoKeyed (Tree a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Tree a) -> Element (Tree a) -> Element (Tree a)) -> Tree a -> Tree a Source #

MonoKeyed (Seq a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Seq a Source #

MonoKeyed (ViewL a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (ViewL a) -> Element (ViewL a) -> Element (ViewL a)) -> ViewL a -> ViewL a Source #

MonoKeyed (ViewR a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (ViewR a) -> Element (ViewR a) -> Element (ViewR a)) -> ViewR a -> ViewR a Source #

Unbox a => MonoKeyed (Vector a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a Source #

Storable a => MonoKeyed (Vector a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a Source #

MonoKeyed (Vector a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a Source #

MonoKeyed (r -> a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (r -> a) -> Element (r -> a) -> Element (r -> a)) -> (r -> a) -> r -> a Source #

MonoKeyed (Either a b) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Either a b Source #

MonoKeyed (a, b) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (a, b) -> Element (a, b) -> Element (a, b)) -> (a, b) -> (a, b) Source #

MonoKeyed (Arg a b) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Arg a b) -> Element (Arg a b) -> Element (Arg a b)) -> Arg a b -> Arg a b Source #

Monad m => MonoKeyed (WrappedMonad m a) Source #

Since: 0.1.0

MonoKeyed (Map k v) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Map k v Source #

Functor m => MonoKeyed (MaybeT m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (MaybeT m a) -> Element (MaybeT m a) -> Element (MaybeT m a)) -> MaybeT m a -> MaybeT m a Source #

Functor m => MonoKeyed (ListT m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (ListT m a) -> Element (ListT m a) -> Element (ListT m a)) -> ListT m a -> ListT m a Source #

MonoKeyed (HashMap k v) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> HashMap k v Source #

Arrow a => MonoKeyed (WrappedArrow a b c) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (WrappedArrow a b c) -> Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> WrappedArrow a b c -> WrappedArrow a b c Source #

MonoKeyed (Const * m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Const * m a) -> Element (Const * m a) -> Element (Const * m a)) -> Const * m a -> Const * m a Source #

Functor m => MonoKeyed (IdentityT * m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (IdentityT * m a) -> Element (IdentityT * m a) -> Element (IdentityT * m a)) -> IdentityT * m a -> IdentityT * m a Source #

Functor m => MonoKeyed (StateT s m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a Source #

Functor m => MonoKeyed (StateT s m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a Source #

Functor m => MonoKeyed (WriterT w m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a Source #

Functor m => MonoKeyed (WriterT w m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a Source #

(Keyed f, Keyed g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoKeyed (Product * f g a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Product * f g a) -> Element (Product * f g a) -> Element (Product * f g a)) -> Product * f g a -> Product * f g a Source #

Functor m => MonoKeyed (ContT * r m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (ContT * r m a) -> Element (ContT * r m a) -> Element (ContT * r m a)) -> ContT * r m a -> ContT * r m a Source #

Keyed m => MonoKeyed (ReaderT * r m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (ReaderT * r m a) -> Element (ReaderT * r m a) -> Element (ReaderT * r m a)) -> ReaderT * r m a -> ReaderT * r m a Source #

(Keyed f, Keyed g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoKeyed (Compose * * f g a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> Element (Compose * * f g a)) -> Compose * * f g a -> Compose * * f g a Source #

Functor m => MonoKeyed (RWST r w s m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a Source #

Functor m => MonoKeyed (RWST r w s m a) Source #

Since: 0.1.0

Methods

omapWithKey :: (MonoKey (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a Source #

class MonoFoldable mono => MonoFoldableWithKey mono where Source #

Monomorphic containers that can be folded over thier pairs of elements and corresponding keys.

Minimal complete definition

ofoldMapWithKey | ofoldlWithKey

Methods

otoKeyedList :: mono -> [(MonoKey mono, Element mono)] Source #

ofoldMapWithKey :: Monoid m => (MonoKey mono -> Element mono -> m) -> mono -> m Source #

ofoldrWithKey :: (MonoKey mono -> Element mono -> a -> a) -> a -> mono -> a Source #

ofoldlWithKey :: (a -> MonoKey mono -> Element mono -> a) -> a -> mono -> a Source #

Instances

MonoFoldableWithKey ByteString Source #

Since: 0.1.0

MonoFoldableWithKey ByteString Source #

Since: 0.1.0

MonoFoldableWithKey IntSet Source #

Since: 0.1.0

MonoFoldableWithKey Text Source #

Since: 0.1.0

Methods

otoKeyedList :: Text -> [(MonoKey Text, Element Text)] Source #

ofoldMapWithKey :: Monoid m => (MonoKey Text -> Element Text -> m) -> Text -> m Source #

ofoldrWithKey :: (MonoKey Text -> Element Text -> a -> a) -> a -> Text -> a Source #

ofoldlWithKey :: (a -> MonoKey Text -> Element Text -> a) -> a -> Text -> a Source #

MonoFoldableWithKey Text Source #

Since: 0.1.0

Methods

otoKeyedList :: Text -> [(MonoKey Text, Element Text)] Source #

ofoldMapWithKey :: Monoid m => (MonoKey Text -> Element Text -> m) -> Text -> m Source #

ofoldrWithKey :: (MonoKey Text -> Element Text -> a -> a) -> a -> Text -> a Source #

ofoldlWithKey :: (a -> MonoKey Text -> Element Text -> a) -> a -> Text -> a Source #

MonoFoldableWithKey [a] Source #

Since: 0.1.0

Methods

otoKeyedList :: [a] -> [(MonoKey [a], Element [a])] Source #

ofoldMapWithKey :: Monoid m => (MonoKey [a] -> Element [a] -> m) -> [a] -> m Source #

ofoldrWithKey :: (MonoKey [a] -> Element [a] -> a -> a) -> a -> [a] -> a Source #

ofoldlWithKey :: (a -> MonoKey [a] -> Element [a] -> a) -> a -> [a] -> a Source #

MonoFoldableWithKey (Maybe a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Maybe a -> [(MonoKey (Maybe a), Element (Maybe a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Maybe a) -> Element (Maybe a) -> m) -> Maybe a -> m Source #

ofoldrWithKey :: (MonoKey (Maybe a) -> Element (Maybe a) -> a -> a) -> a -> Maybe a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Maybe a) -> Element (Maybe a) -> a) -> a -> Maybe a -> a Source #

MonoFoldableWithKey (Option a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Option a -> [(MonoKey (Option a), Element (Option a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Option a) -> Element (Option a) -> m) -> Option a -> m Source #

ofoldrWithKey :: (MonoKey (Option a) -> Element (Option a) -> a -> a) -> a -> Option a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Option a) -> Element (Option a) -> a) -> a -> Option a -> a Source #

MonoFoldableWithKey (NonEmpty a) Source #

Since: 0.1.0

Methods

otoKeyedList :: NonEmpty a -> [(MonoKey (NonEmpty a), Element (NonEmpty a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (NonEmpty a) -> Element (NonEmpty a) -> m) -> NonEmpty a -> m Source #

ofoldrWithKey :: (MonoKey (NonEmpty a) -> Element (NonEmpty a) -> a -> a) -> a -> NonEmpty a -> a Source #

ofoldlWithKey :: (a -> MonoKey (NonEmpty a) -> Element (NonEmpty a) -> a) -> a -> NonEmpty a -> a Source #

MonoFoldableWithKey (Identity a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Identity a -> [(MonoKey (Identity a), Element (Identity a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Identity a) -> Element (Identity a) -> m) -> Identity a -> m Source #

ofoldrWithKey :: (MonoKey (Identity a) -> Element (Identity a) -> a -> a) -> a -> Identity a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Identity a) -> Element (Identity a) -> a) -> a -> Identity a -> a Source #

MonoFoldableWithKey (IntMap a) Source #

Since: 0.1.0

Methods

otoKeyedList :: IntMap a -> [(MonoKey (IntMap a), Element (IntMap a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (IntMap a) -> Element (IntMap a) -> m) -> IntMap a -> m Source #

ofoldrWithKey :: (MonoKey (IntMap a) -> Element (IntMap a) -> a -> a) -> a -> IntMap a -> a Source #

ofoldlWithKey :: (a -> MonoKey (IntMap a) -> Element (IntMap a) -> a) -> a -> IntMap a -> a Source #

MonoFoldableWithKey (Tree a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Tree a -> [(MonoKey (Tree a), Element (Tree a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Tree a) -> Element (Tree a) -> m) -> Tree a -> m Source #

ofoldrWithKey :: (MonoKey (Tree a) -> Element (Tree a) -> a -> a) -> a -> Tree a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Tree a) -> Element (Tree a) -> a) -> a -> Tree a -> a Source #

MonoFoldableWithKey (Seq a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Seq a -> [(MonoKey (Seq a), Element (Seq a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Seq a) -> Element (Seq a) -> m) -> Seq a -> m Source #

ofoldrWithKey :: (MonoKey (Seq a) -> Element (Seq a) -> a -> a) -> a -> Seq a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Seq a) -> Element (Seq a) -> a) -> a -> Seq a -> a Source #

MonoFoldableWithKey (ViewL a) Source #

Since: 0.1.0

Methods

otoKeyedList :: ViewL a -> [(MonoKey (ViewL a), Element (ViewL a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (ViewL a) -> Element (ViewL a) -> m) -> ViewL a -> m Source #

ofoldrWithKey :: (MonoKey (ViewL a) -> Element (ViewL a) -> a -> a) -> a -> ViewL a -> a Source #

ofoldlWithKey :: (a -> MonoKey (ViewL a) -> Element (ViewL a) -> a) -> a -> ViewL a -> a Source #

MonoFoldableWithKey (ViewR a) Source #

Since: 0.1.0

Methods

otoKeyedList :: ViewR a -> [(MonoKey (ViewR a), Element (ViewR a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (ViewR a) -> Element (ViewR a) -> m) -> ViewR a -> m Source #

ofoldrWithKey :: (MonoKey (ViewR a) -> Element (ViewR a) -> a -> a) -> a -> ViewR a -> a Source #

ofoldlWithKey :: (a -> MonoKey (ViewR a) -> Element (ViewR a) -> a) -> a -> ViewR a -> a Source #

Ord e => MonoFoldableWithKey (Set e) Source #

Since: 0.1.0

Methods

otoKeyedList :: Set e -> [(MonoKey (Set e), Element (Set e))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Set e) -> Element (Set e) -> m) -> Set e -> m Source #

ofoldrWithKey :: (MonoKey (Set e) -> Element (Set e) -> a -> a) -> a -> Set e -> a Source #

ofoldlWithKey :: (a -> MonoKey (Set e) -> Element (Set e) -> a) -> a -> Set e -> a Source #

MonoFoldableWithKey (HashSet v) Source #

Since: 0.1.0

Methods

otoKeyedList :: HashSet v -> [(MonoKey (HashSet v), Element (HashSet v))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (HashSet v) -> Element (HashSet v) -> m) -> HashSet v -> m Source #

ofoldrWithKey :: (MonoKey (HashSet v) -> Element (HashSet v) -> a -> a) -> a -> HashSet v -> a Source #

ofoldlWithKey :: (a -> MonoKey (HashSet v) -> Element (HashSet v) -> a) -> a -> HashSet v -> a Source #

Unbox a => MonoFoldableWithKey (Vector a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Vector a -> [(MonoKey (Vector a), Element (Vector a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Vector a) -> Element (Vector a) -> m) -> Vector a -> m Source #

ofoldrWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> a -> a) -> a -> Vector a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Vector a) -> Element (Vector a) -> a) -> a -> Vector a -> a Source #

Storable a => MonoFoldableWithKey (Vector a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Vector a -> [(MonoKey (Vector a), Element (Vector a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Vector a) -> Element (Vector a) -> m) -> Vector a -> m Source #

ofoldrWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> a -> a) -> a -> Vector a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Vector a) -> Element (Vector a) -> a) -> a -> Vector a -> a Source #

MonoFoldableWithKey (Vector a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Vector a -> [(MonoKey (Vector a), Element (Vector a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Vector a) -> Element (Vector a) -> m) -> Vector a -> m Source #

ofoldrWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> a -> a) -> a -> Vector a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Vector a) -> Element (Vector a) -> a) -> a -> Vector a -> a Source #

MonoFoldableWithKey (Either a b) Source #

Since: 0.1.0

Methods

otoKeyedList :: Either a b -> [(MonoKey (Either a b), Element (Either a b))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Either a b) -> Element (Either a b) -> m) -> Either a b -> m Source #

ofoldrWithKey :: (MonoKey (Either a b) -> Element (Either a b) -> a -> a) -> a -> Either a b -> a Source #

ofoldlWithKey :: (a -> MonoKey (Either a b) -> Element (Either a b) -> a) -> a -> Either a b -> a Source #

MonoFoldableWithKey (a, b) Source #

Since: 0.1.0

Methods

otoKeyedList :: (a, b) -> [(MonoKey (a, b), Element (a, b))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (a, b) -> Element (a, b) -> m) -> (a, b) -> m Source #

ofoldrWithKey :: (MonoKey (a, b) -> Element (a, b) -> a -> a) -> a -> (a, b) -> a Source #

ofoldlWithKey :: (a -> MonoKey (a, b) -> Element (a, b) -> a) -> a -> (a, b) -> a Source #

MonoFoldableWithKey (Map k v) Source #

Since: 0.1.0

Methods

otoKeyedList :: Map k v -> [(MonoKey (Map k v), Element (Map k v))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Map k v) -> Element (Map k v) -> m) -> Map k v -> m Source #

ofoldrWithKey :: (MonoKey (Map k v) -> Element (Map k v) -> a -> a) -> a -> Map k v -> a Source #

ofoldlWithKey :: (a -> MonoKey (Map k v) -> Element (Map k v) -> a) -> a -> Map k v -> a Source #

Foldable f => MonoFoldableWithKey (MaybeT f a) Source #

Since: 0.1.0

Methods

otoKeyedList :: MaybeT f a -> [(MonoKey (MaybeT f a), Element (MaybeT f a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (MaybeT f a) -> Element (MaybeT f a) -> m) -> MaybeT f a -> m Source #

ofoldrWithKey :: (MonoKey (MaybeT f a) -> Element (MaybeT f a) -> a -> a) -> a -> MaybeT f a -> a Source #

ofoldlWithKey :: (a -> MonoKey (MaybeT f a) -> Element (MaybeT f a) -> a) -> a -> MaybeT f a -> a Source #

Foldable f => MonoFoldableWithKey (ListT f a) Source #

Since: 0.1.0

Methods

otoKeyedList :: ListT f a -> [(MonoKey (ListT f a), Element (ListT f a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (ListT f a) -> Element (ListT f a) -> m) -> ListT f a -> m Source #

ofoldrWithKey :: (MonoKey (ListT f a) -> Element (ListT f a) -> a -> a) -> a -> ListT f a -> a Source #

ofoldlWithKey :: (a -> MonoKey (ListT f a) -> Element (ListT f a) -> a) -> a -> ListT f a -> a Source #

MonoFoldableWithKey (HashMap k v) Source #

Since: 0.1.0

Methods

otoKeyedList :: HashMap k v -> [(MonoKey (HashMap k v), Element (HashMap k v))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (HashMap k v) -> Element (HashMap k v) -> m) -> HashMap k v -> m Source #

ofoldrWithKey :: (MonoKey (HashMap k v) -> Element (HashMap k v) -> a -> a) -> a -> HashMap k v -> a Source #

ofoldlWithKey :: (a -> MonoKey (HashMap k v) -> Element (HashMap k v) -> a) -> a -> HashMap k v -> a Source #

MonoFoldableWithKey (Const * m a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Const * m a -> [(MonoKey (Const * m a), Element (Const * m a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Const * m a) -> Element (Const * m a) -> m) -> Const * m a -> m Source #

ofoldrWithKey :: (MonoKey (Const * m a) -> Element (Const * m a) -> a -> a) -> a -> Const * m a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Const * m a) -> Element (Const * m a) -> a) -> a -> Const * m a -> a Source #

Foldable f => MonoFoldableWithKey (IdentityT * f a) Source #

Since: 0.1.0

Methods

otoKeyedList :: IdentityT * f a -> [(MonoKey (IdentityT * f a), Element (IdentityT * f a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (IdentityT * f a) -> Element (IdentityT * f a) -> m) -> IdentityT * f a -> m Source #

ofoldrWithKey :: (MonoKey (IdentityT * f a) -> Element (IdentityT * f a) -> a -> a) -> a -> IdentityT * f a -> a Source #

ofoldlWithKey :: (a -> MonoKey (IdentityT * f a) -> Element (IdentityT * f a) -> a) -> a -> IdentityT * f a -> a Source #

Foldable f => MonoFoldableWithKey (WriterT w f a) Source #

Since: 0.1.0

Methods

otoKeyedList :: WriterT w f a -> [(MonoKey (WriterT w f a), Element (WriterT w f a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> m) -> WriterT w f a -> m Source #

ofoldrWithKey :: (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> a -> a) -> a -> WriterT w f a -> a Source #

ofoldlWithKey :: (a -> MonoKey (WriterT w f a) -> Element (WriterT w f a) -> a) -> a -> WriterT w f a -> a Source #

Foldable f => MonoFoldableWithKey (WriterT w f a) Source #

Since: 0.1.0

Methods

otoKeyedList :: WriterT w f a -> [(MonoKey (WriterT w f a), Element (WriterT w f a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> m) -> WriterT w f a -> m Source #

ofoldrWithKey :: (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> a -> a) -> a -> WriterT w f a -> a Source #

ofoldlWithKey :: (a -> MonoKey (WriterT w f a) -> Element (WriterT w f a) -> a) -> a -> WriterT w f a -> a Source #

(FoldableWithKey f, FoldableWithKey g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoFoldableWithKey (Product * f g a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Product * f g a -> [(MonoKey (Product * f g a), Element (Product * f g a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Product * f g a) -> Element (Product * f g a) -> m) -> Product * f g a -> m Source #

ofoldrWithKey :: (MonoKey (Product * f g a) -> Element (Product * f g a) -> a -> a) -> a -> Product * f g a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Product * f g a) -> Element (Product * f g a) -> a) -> a -> Product * f g a -> a Source #

(FoldableWithKey f, FoldableWithKey g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoFoldableWithKey (Compose * * f g a) Source #

Since: 0.1.0

Methods

otoKeyedList :: Compose * * f g a -> [(MonoKey (Compose * * f g a), Element (Compose * * f g a))] Source #

ofoldMapWithKey :: Monoid m => (MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> m) -> Compose * * f g a -> m Source #

ofoldrWithKey :: (MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> a -> a) -> a -> Compose * * f g a -> a Source #

ofoldlWithKey :: (a -> MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> a) -> a -> Compose * * f g a -> a Source #

class (MonoKeyed mono, MonoFoldableWithKey mono, MonoTraversable mono) => MonoTraversableWithKey mono where Source #

Monomorphic containers that can be traversed from left to right over thier pairs of elements and corresponding keys.

Minimal complete definition

otraverseWithKey

Methods

otraverseWithKey :: Applicative f => (MonoKey mono -> Element mono -> f (Element mono)) -> mono -> f mono Source #

Map each key-element pair of a monomorphic container to an action, evaluate these actions from left to right, and collect the results. {--}

otraverseWithKey :: (Applicative f, TraversableWithKey t, Element (t a) ~ a, MonoKey (t a) ~ Key t, t a ~ mono) => (MonoKey mono -> Element mono -> f (Element mono)) -> mono -> f mono Source #

Map each key-element pair of a monomorphic container to an action, evaluate these actions from left to right, and collect the results. {--}

omapWithKeyM :: Monad m => (MonoKey mono -> Element mono -> m (Element mono)) -> mono -> m mono Source #

Like otraverse but with a Monad constraint.

Instances

MonoTraversableWithKey ByteString Source #

Since: 0.1.0

MonoTraversableWithKey ByteString Source #

Since: 0.1.0

MonoTraversableWithKey Text Source #

Since: 0.1.0

MonoTraversableWithKey Text Source #

Since: 0.1.0

MonoTraversableWithKey [a] Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey [a] -> Element [a] -> f (Element [a])) -> [a] -> f [a] Source #

omapWithKeyM :: Monad m => (MonoKey [a] -> Element [a] -> m (Element [a])) -> [a] -> m [a] Source #

MonoTraversableWithKey (Maybe a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Maybe a) -> Element (Maybe a) -> f (Element (Maybe a))) -> Maybe a -> f (Maybe a) Source #

omapWithKeyM :: Monad m => (MonoKey (Maybe a) -> Element (Maybe a) -> m (Element (Maybe a))) -> Maybe a -> m (Maybe a) Source #

MonoTraversableWithKey (Option a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Option a) -> Element (Option a) -> f (Element (Option a))) -> Option a -> f (Option a) Source #

omapWithKeyM :: Monad m => (MonoKey (Option a) -> Element (Option a) -> m (Element (Option a))) -> Option a -> m (Option a) Source #

MonoTraversableWithKey (NonEmpty a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (NonEmpty a) -> Element (NonEmpty a) -> f (Element (NonEmpty a))) -> NonEmpty a -> f (NonEmpty a) Source #

omapWithKeyM :: Monad m => (MonoKey (NonEmpty a) -> Element (NonEmpty a) -> m (Element (NonEmpty a))) -> NonEmpty a -> m (NonEmpty a) Source #

MonoTraversableWithKey (Identity a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Identity a) -> Element (Identity a) -> f (Element (Identity a))) -> Identity a -> f (Identity a) Source #

omapWithKeyM :: Monad m => (MonoKey (Identity a) -> Element (Identity a) -> m (Element (Identity a))) -> Identity a -> m (Identity a) Source #

MonoTraversableWithKey (IntMap a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (IntMap a) -> Element (IntMap a) -> f (Element (IntMap a))) -> IntMap a -> f (IntMap a) Source #

omapWithKeyM :: Monad m => (MonoKey (IntMap a) -> Element (IntMap a) -> m (Element (IntMap a))) -> IntMap a -> m (IntMap a) Source #

MonoTraversableWithKey (Tree a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Tree a) -> Element (Tree a) -> f (Element (Tree a))) -> Tree a -> f (Tree a) Source #

omapWithKeyM :: Monad m => (MonoKey (Tree a) -> Element (Tree a) -> m (Element (Tree a))) -> Tree a -> m (Tree a) Source #

MonoTraversableWithKey (Seq a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Seq a) -> Element (Seq a) -> f (Element (Seq a))) -> Seq a -> f (Seq a) Source #

omapWithKeyM :: Monad m => (MonoKey (Seq a) -> Element (Seq a) -> m (Element (Seq a))) -> Seq a -> m (Seq a) Source #

MonoTraversableWithKey (ViewL a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (ViewL a) -> Element (ViewL a) -> f (Element (ViewL a))) -> ViewL a -> f (ViewL a) Source #

omapWithKeyM :: Monad m => (MonoKey (ViewL a) -> Element (ViewL a) -> m (Element (ViewL a))) -> ViewL a -> m (ViewL a) Source #

MonoTraversableWithKey (ViewR a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (ViewR a) -> Element (ViewR a) -> f (Element (ViewR a))) -> ViewR a -> f (ViewR a) Source #

omapWithKeyM :: Monad m => (MonoKey (ViewR a) -> Element (ViewR a) -> m (Element (ViewR a))) -> ViewR a -> m (ViewR a) Source #

Unbox a => MonoTraversableWithKey (Vector a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Vector a) -> Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) Source #

omapWithKeyM :: Monad m => (MonoKey (Vector a) -> Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) Source #

Storable a => MonoTraversableWithKey (Vector a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Vector a) -> Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) Source #

omapWithKeyM :: Monad m => (MonoKey (Vector a) -> Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) Source #

MonoTraversableWithKey (Vector a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Vector a) -> Element (Vector a) -> f (Element (Vector a))) -> Vector a -> f (Vector a) Source #

omapWithKeyM :: Monad m => (MonoKey (Vector a) -> Element (Vector a) -> m (Element (Vector a))) -> Vector a -> m (Vector a) Source #

MonoTraversableWithKey (Either a b) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Either a b) -> Element (Either a b) -> f (Element (Either a b))) -> Either a b -> f (Either a b) Source #

omapWithKeyM :: Monad m => (MonoKey (Either a b) -> Element (Either a b) -> m (Element (Either a b))) -> Either a b -> m (Either a b) Source #

MonoTraversableWithKey (a, b) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (a, b) -> Element (a, b) -> f (Element (a, b))) -> (a, b) -> f (a, b) Source #

omapWithKeyM :: Monad m => (MonoKey (a, b) -> Element (a, b) -> m (Element (a, b))) -> (a, b) -> m (a, b) Source #

MonoTraversableWithKey (Map k v) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Map k v) -> Element (Map k v) -> f (Element (Map k v))) -> Map k v -> f (Map k v) Source #

omapWithKeyM :: Monad m => (MonoKey (Map k v) -> Element (Map k v) -> m (Element (Map k v))) -> Map k v -> m (Map k v) Source #

Traversable f => MonoTraversableWithKey (MaybeT f a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (MaybeT f a) -> Element (MaybeT f a) -> f (Element (MaybeT f a))) -> MaybeT f a -> f (MaybeT f a) Source #

omapWithKeyM :: Monad m => (MonoKey (MaybeT f a) -> Element (MaybeT f a) -> m (Element (MaybeT f a))) -> MaybeT f a -> m (MaybeT f a) Source #

Traversable f => MonoTraversableWithKey (ListT f a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (ListT f a) -> Element (ListT f a) -> f (Element (ListT f a))) -> ListT f a -> f (ListT f a) Source #

omapWithKeyM :: Monad m => (MonoKey (ListT f a) -> Element (ListT f a) -> m (Element (ListT f a))) -> ListT f a -> m (ListT f a) Source #

MonoTraversableWithKey (HashMap k v) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (HashMap k v) -> Element (HashMap k v) -> f (Element (HashMap k v))) -> HashMap k v -> f (HashMap k v) Source #

omapWithKeyM :: Monad m => (MonoKey (HashMap k v) -> Element (HashMap k v) -> m (Element (HashMap k v))) -> HashMap k v -> m (HashMap k v) Source #

MonoTraversableWithKey (Const * m a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Const * m a) -> Element (Const * m a) -> f (Element (Const * m a))) -> Const * m a -> f (Const * m a) Source #

omapWithKeyM :: Monad m => (MonoKey (Const * m a) -> Element (Const * m a) -> m (Element (Const * m a))) -> Const * m a -> m (Const * m a) Source #

Traversable f => MonoTraversableWithKey (IdentityT * f a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (IdentityT * f a) -> Element (IdentityT * f a) -> f (Element (IdentityT * f a))) -> IdentityT * f a -> f (IdentityT * f a) Source #

omapWithKeyM :: Monad m => (MonoKey (IdentityT * f a) -> Element (IdentityT * f a) -> m (Element (IdentityT * f a))) -> IdentityT * f a -> m (IdentityT * f a) Source #

Traversable f => MonoTraversableWithKey (WriterT w f a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> f (Element (WriterT w f a))) -> WriterT w f a -> f (WriterT w f a) Source #

omapWithKeyM :: Monad m => (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> m (Element (WriterT w f a))) -> WriterT w f a -> m (WriterT w f a) Source #

Traversable f => MonoTraversableWithKey (WriterT w f a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> f (Element (WriterT w f a))) -> WriterT w f a -> f (WriterT w f a) Source #

omapWithKeyM :: Monad m => (MonoKey (WriterT w f a) -> Element (WriterT w f a) -> m (Element (WriterT w f a))) -> WriterT w f a -> m (WriterT w f a) Source #

((~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g), TraversableWithKey f, TraversableWithKey g) => MonoTraversableWithKey (Product * f g a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Product * f g a) -> Element (Product * f g a) -> f (Element (Product * f g a))) -> Product * f g a -> f (Product * f g a) Source #

omapWithKeyM :: Monad m => (MonoKey (Product * f g a) -> Element (Product * f g a) -> m (Element (Product * f g a))) -> Product * f g a -> m (Product * f g a) Source #

((~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g), TraversableWithKey f, TraversableWithKey g) => MonoTraversableWithKey (Compose * * f g a) Source #

Since: 0.1.0

Methods

otraverseWithKey :: Applicative f => (MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> f (Element (Compose * * f g a))) -> Compose * * f g a -> f (Compose * * f g a) Source #

omapWithKeyM :: Monad m => (MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> m (Element (Compose * * f g a))) -> Compose * * f g a -> m (Compose * * f g a) Source #

Adjustable Monomorphic Structures

class MonoFunctor mono => MonoAdjustable mono where Source #

Monomorphic container that can adjust elements "in place."

Minimal complete definition

oadjust

Methods

oadjust :: (Element mono -> Element mono) -> MonoKey mono -> mono -> mono Source #

oadjust :: (Adjustable f, Element (f a) ~ a, MonoKey (f a) ~ Key f, f a ~ mono) => (Element mono -> Element mono) -> MonoKey mono -> mono -> mono Source #

oreplace :: MonoKey mono -> Element mono -> mono -> mono Source #

Instances

MonoAdjustable ByteString Source #

Since: 0.1.0

MonoAdjustable ByteString Source #

Since: 0.1.0

MonoAdjustable Text Source #

Since: 0.1.0

MonoAdjustable Text Source #

Since: 0.1.0

MonoAdjustable [a] Source #

Since: 0.1.0

Methods

oadjust :: (Element [a] -> Element [a]) -> MonoKey [a] -> [a] -> [a] Source #

oreplace :: MonoKey [a] -> Element [a] -> [a] -> [a] Source #

MonoAdjustable (Maybe a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Maybe a) -> Element (Maybe a)) -> MonoKey (Maybe a) -> Maybe a -> Maybe a Source #

oreplace :: MonoKey (Maybe a) -> Element (Maybe a) -> Maybe a -> Maybe a Source #

MonoAdjustable (IO a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (IO a) -> Element (IO a)) -> MonoKey (IO a) -> IO a -> IO a Source #

oreplace :: MonoKey (IO a) -> Element (IO a) -> IO a -> IO a Source #

MonoAdjustable (Option a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Option a) -> Element (Option a)) -> MonoKey (Option a) -> Option a -> Option a Source #

oreplace :: MonoKey (Option a) -> Element (Option a) -> Option a -> Option a Source #

MonoAdjustable (NonEmpty a) Source #

Since: 0.1.0

MonoAdjustable (ZipList a) Source #

Since: 0.1.0

MonoAdjustable (Identity a) Source #

Since: 0.1.0

MonoAdjustable (IntMap a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (IntMap a) -> Element (IntMap a)) -> MonoKey (IntMap a) -> IntMap a -> IntMap a Source #

oreplace :: MonoKey (IntMap a) -> Element (IntMap a) -> IntMap a -> IntMap a Source #

MonoAdjustable (Tree a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Tree a) -> Element (Tree a)) -> MonoKey (Tree a) -> Tree a -> Tree a Source #

oreplace :: MonoKey (Tree a) -> Element (Tree a) -> Tree a -> Tree a Source #

MonoAdjustable (Seq a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Seq a) -> Element (Seq a)) -> MonoKey (Seq a) -> Seq a -> Seq a Source #

oreplace :: MonoKey (Seq a) -> Element (Seq a) -> Seq a -> Seq a Source #

MonoAdjustable (ViewL a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (ViewL a) -> Element (ViewL a)) -> MonoKey (ViewL a) -> ViewL a -> ViewL a Source #

oreplace :: MonoKey (ViewL a) -> Element (ViewL a) -> ViewL a -> ViewL a Source #

MonoAdjustable (ViewR a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (ViewR a) -> Element (ViewR a)) -> MonoKey (ViewR a) -> ViewR a -> ViewR a Source #

oreplace :: MonoKey (ViewR a) -> Element (ViewR a) -> ViewR a -> ViewR a Source #

Unbox a => MonoAdjustable (Vector a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Vector a) -> Element (Vector a)) -> MonoKey (Vector a) -> Vector a -> Vector a Source #

oreplace :: MonoKey (Vector a) -> Element (Vector a) -> Vector a -> Vector a Source #

Storable a => MonoAdjustable (Vector a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Vector a) -> Element (Vector a)) -> MonoKey (Vector a) -> Vector a -> Vector a Source #

oreplace :: MonoKey (Vector a) -> Element (Vector a) -> Vector a -> Vector a Source #

MonoAdjustable (Vector a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Vector a) -> Element (Vector a)) -> MonoKey (Vector a) -> Vector a -> Vector a Source #

oreplace :: MonoKey (Vector a) -> Element (Vector a) -> Vector a -> Vector a Source #

MonoAdjustable (r -> a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (r -> a) -> Element (r -> a)) -> MonoKey (r -> a) -> (r -> a) -> r -> a Source #

oreplace :: MonoKey (r -> a) -> Element (r -> a) -> (r -> a) -> r -> a Source #

MonoAdjustable (Either a b) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Either a b) -> Element (Either a b)) -> MonoKey (Either a b) -> Either a b -> Either a b Source #

oreplace :: MonoKey (Either a b) -> Element (Either a b) -> Either a b -> Either a b Source #

MonoAdjustable (a, b) Source #

Since: 0.1.0

Methods

oadjust :: (Element (a, b) -> Element (a, b)) -> MonoKey (a, b) -> (a, b) -> (a, b) Source #

oreplace :: MonoKey (a, b) -> Element (a, b) -> (a, b) -> (a, b) Source #

MonoAdjustable (Arg a b) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Arg a b) -> Element (Arg a b)) -> MonoKey (Arg a b) -> Arg a b -> Arg a b Source #

oreplace :: MonoKey (Arg a b) -> Element (Arg a b) -> Arg a b -> Arg a b Source #

Monad m => MonoAdjustable (WrappedMonad m a) Source #

Since: 0.1.0

Ord k => MonoAdjustable (Map k v) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Map k v) -> Element (Map k v)) -> MonoKey (Map k v) -> Map k v -> Map k v Source #

oreplace :: MonoKey (Map k v) -> Element (Map k v) -> Map k v -> Map k v Source #

Functor m => MonoAdjustable (MaybeT m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (MaybeT m a) -> Element (MaybeT m a)) -> MonoKey (MaybeT m a) -> MaybeT m a -> MaybeT m a Source #

oreplace :: MonoKey (MaybeT m a) -> Element (MaybeT m a) -> MaybeT m a -> MaybeT m a Source #

Functor m => MonoAdjustable (ListT m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (ListT m a) -> Element (ListT m a)) -> MonoKey (ListT m a) -> ListT m a -> ListT m a Source #

oreplace :: MonoKey (ListT m a) -> Element (ListT m a) -> ListT m a -> ListT m a Source #

(Eq k, Hashable k) => MonoAdjustable (HashMap k v) Source #

Since: 0.1.0

Methods

oadjust :: (Element (HashMap k v) -> Element (HashMap k v)) -> MonoKey (HashMap k v) -> HashMap k v -> HashMap k v Source #

oreplace :: MonoKey (HashMap k v) -> Element (HashMap k v) -> HashMap k v -> HashMap k v Source #

Arrow a => MonoAdjustable (WrappedArrow a b c) Source #

Since: 0.1.0

Methods

oadjust :: (Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> MonoKey (WrappedArrow a b c) -> WrappedArrow a b c -> WrappedArrow a b c Source #

oreplace :: MonoKey (WrappedArrow a b c) -> Element (WrappedArrow a b c) -> WrappedArrow a b c -> WrappedArrow a b c Source #

MonoAdjustable (Const * m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Const * m a) -> Element (Const * m a)) -> MonoKey (Const * m a) -> Const * m a -> Const * m a Source #

oreplace :: MonoKey (Const * m a) -> Element (Const * m a) -> Const * m a -> Const * m a Source #

Functor m => MonoAdjustable (IdentityT * m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (IdentityT * m a) -> Element (IdentityT * m a)) -> MonoKey (IdentityT * m a) -> IdentityT * m a -> IdentityT * m a Source #

oreplace :: MonoKey (IdentityT * m a) -> Element (IdentityT * m a) -> IdentityT * m a -> IdentityT * m a Source #

Functor m => MonoAdjustable (StateT s m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (StateT s m a) -> Element (StateT s m a)) -> MonoKey (StateT s m a) -> StateT s m a -> StateT s m a Source #

oreplace :: MonoKey (StateT s m a) -> Element (StateT s m a) -> StateT s m a -> StateT s m a Source #

Functor m => MonoAdjustable (StateT s m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (StateT s m a) -> Element (StateT s m a)) -> MonoKey (StateT s m a) -> StateT s m a -> StateT s m a Source #

oreplace :: MonoKey (StateT s m a) -> Element (StateT s m a) -> StateT s m a -> StateT s m a Source #

Functor m => MonoAdjustable (WriterT w m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (WriterT w m a) -> Element (WriterT w m a)) -> MonoKey (WriterT w m a) -> WriterT w m a -> WriterT w m a Source #

oreplace :: MonoKey (WriterT w m a) -> Element (WriterT w m a) -> WriterT w m a -> WriterT w m a Source #

Functor m => MonoAdjustable (WriterT w m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (WriterT w m a) -> Element (WriterT w m a)) -> MonoKey (WriterT w m a) -> WriterT w m a -> WriterT w m a Source #

oreplace :: MonoKey (WriterT w m a) -> Element (WriterT w m a) -> WriterT w m a -> WriterT w m a Source #

(Adjustable f, Adjustable g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoAdjustable (Product * f g a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (Product * f g a) -> Element (Product * f g a)) -> MonoKey (Product * f g a) -> Product * f g a -> Product * f g a Source #

oreplace :: MonoKey (Product * f g a) -> Element (Product * f g a) -> Product * f g a -> Product * f g a Source #

Functor m => MonoAdjustable (ContT * r m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (ContT * r m a) -> Element (ContT * r m a)) -> MonoKey (ContT * r m a) -> ContT * r m a -> ContT * r m a Source #

oreplace :: MonoKey (ContT * r m a) -> Element (ContT * r m a) -> ContT * r m a -> ContT * r m a Source #

Functor m => MonoAdjustable (ReaderT * r m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (ReaderT * r m a) -> Element (ReaderT * r m a)) -> MonoKey (ReaderT * r m a) -> ReaderT * r m a -> ReaderT * r m a Source #

oreplace :: MonoKey (ReaderT * r m a) -> Element (ReaderT * r m a) -> ReaderT * r m a -> ReaderT * r m a Source #

Functor m => MonoAdjustable (RWST r w s m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (RWST r w s m a) -> Element (RWST r w s m a)) -> MonoKey (RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

oreplace :: MonoKey (RWST r w s m a) -> Element (RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

Functor m => MonoAdjustable (RWST r w s m a) Source #

Since: 0.1.0

Methods

oadjust :: (Element (RWST r w s m a) -> Element (RWST r w s m a)) -> MonoKey (RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

oreplace :: MonoKey (RWST r w s m a) -> Element (RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

Zippable Monomorphic Structures

class MonoFunctor mono => MonoZip mono where Source #

Monomorphic container that can be zipped together, merging thier elements.

Laws:

ozipWith const u u === ozipWith (flip const) u u === u
ozipWith (flip f) x y === ozipWith f y x
ozipWith (a b -> f (g a) (h b)) x y === ozipWith f (omap g x) (omap h y)

Minimal complete definition

ozipWith

Methods

ozipWith :: (Element mono -> Element mono -> Element mono) -> mono -> mono -> mono Source #

Instances

MonoZip ByteString Source #

Since: 0.1.0

MonoZip ByteString Source #

Since: 0.1.0

MonoZip Text Source #

Since: 0.1.0

MonoZip Text Source #

Since: 0.1.0

MonoZip [a] Source #

Since: 0.1.0

Methods

ozipWith :: (Element [a] -> Element [a] -> Element [a]) -> [a] -> [a] -> [a] Source #

MonoZip (Maybe a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Maybe a -> Maybe a Source #

MonoZip (IO a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (IO a) -> Element (IO a) -> Element (IO a)) -> IO a -> IO a -> IO a Source #

MonoZip (Option a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Option a) -> Element (Option a) -> Element (Option a)) -> Option a -> Option a -> Option a Source #

MonoZip (NonEmpty a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (NonEmpty a) -> Element (NonEmpty a) -> Element (NonEmpty a)) -> NonEmpty a -> NonEmpty a -> NonEmpty a Source #

MonoZip (ZipList a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (ZipList a) -> Element (ZipList a) -> Element (ZipList a)) -> ZipList a -> ZipList a -> ZipList a Source #

MonoZip (Identity a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Identity a) -> Element (Identity a) -> Element (Identity a)) -> Identity a -> Identity a -> Identity a Source #

MonoZip (IntMap a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> IntMap a -> IntMap a Source #

MonoZip (Tree a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Tree a) -> Element (Tree a) -> Element (Tree a)) -> Tree a -> Tree a -> Tree a Source #

MonoZip (Seq a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Seq a -> Seq a Source #

MonoZip (ViewL a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (ViewL a) -> Element (ViewL a) -> Element (ViewL a)) -> ViewL a -> ViewL a -> ViewL a Source #

MonoZip (ViewR a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (ViewR a) -> Element (ViewR a) -> Element (ViewR a)) -> ViewR a -> ViewR a -> ViewR a Source #

Unbox a => MonoZip (Vector a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a -> Vector a Source #

Storable a => MonoZip (Vector a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a -> Vector a Source #

MonoZip (Vector a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a -> Vector a Source #

MonoZip (r -> a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (r -> a) -> Element (r -> a) -> Element (r -> a)) -> (r -> a) -> (r -> a) -> r -> a Source #

MonoZip (Either a b) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Either a b -> Either a b Source #

MonoZip (a, b) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (a, b) -> Element (a, b) -> Element (a, b)) -> (a, b) -> (a, b) -> (a, b) Source #

MonoZip (Arg a b) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Arg a b) -> Element (Arg a b) -> Element (Arg a b)) -> Arg a b -> Arg a b -> Arg a b Source #

Monad m => MonoZip (WrappedMonad m a) Source #

Since: 0.1.0

Ord k => MonoZip (Map k v) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Map k v -> Map k v Source #

Applicative m => MonoZip (MaybeT m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (MaybeT m a) -> Element (MaybeT m a) -> Element (MaybeT m a)) -> MaybeT m a -> MaybeT m a -> MaybeT m a Source #

Applicative m => MonoZip (ListT m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (ListT m a) -> Element (ListT m a) -> Element (ListT m a)) -> ListT m a -> ListT m a -> ListT m a Source #

(Eq k, Hashable k) => MonoZip (HashMap k v) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> HashMap k v -> HashMap k v Source #

Arrow a => MonoZip (WrappedArrow a b c) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (WrappedArrow a b c) -> Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> WrappedArrow a b c -> WrappedArrow a b c -> WrappedArrow a b c Source #

MonoZip (Const * m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Const * m a) -> Element (Const * m a) -> Element (Const * m a)) -> Const * m a -> Const * m a -> Const * m a Source #

Applicative m => MonoZip (IdentityT * m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (IdentityT * m a) -> Element (IdentityT * m a) -> Element (IdentityT * m a)) -> IdentityT * m a -> IdentityT * m a -> IdentityT * m a Source #

Applicative m => MonoZip (StateT s m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a -> StateT s m a Source #

Applicative m => MonoZip (StateT s m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Applicative m, Monoid w) => MonoZip (WriterT w m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a -> WriterT w m a Source #

(Applicative m, Monoid w) => MonoZip (WriterT w m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a -> WriterT w m a Source #

(Zip f, Zip g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoZip (Product * f g a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Product * f g a) -> Element (Product * f g a) -> Element (Product * f g a)) -> Product * f g a -> Product * f g a -> Product * f g a Source #

Functor m => MonoZip (ContT * r m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (ContT * r m a) -> Element (ContT * r m a) -> Element (ContT * r m a)) -> ContT * r m a -> ContT * r m a -> ContT * r m a Source #

Applicative m => MonoZip (ReaderT * r m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (ReaderT * r m a) -> Element (ReaderT * r m a) -> Element (ReaderT * r m a)) -> ReaderT * r m a -> ReaderT * r m a -> ReaderT * r m a Source #

(Zip f, Zip g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoZip (Compose * * f g a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (Compose * * f g a) -> Element (Compose * * f g a) -> Element (Compose * * f g a)) -> Compose * * f g a -> Compose * * f g a -> Compose * * f g a Source #

(Applicative m, Semigroup w) => MonoZip (RWST r w s m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

(Applicative m, Semigroup w) => MonoZip (RWST r w s m a) Source #

Since: 0.1.0

Methods

ozipWith :: (Element (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

class (MonoKeyed mono, MonoZip mono) => MonoZipWithKey mono where Source #

Monomorphic container that can be zipped together, merging thier pairs of elements and corresponding keys.

Minimal complete definition

ozipWithKey

Methods

ozipWithKey :: (MonoKey mono -> Element mono -> Element mono -> Element mono) -> mono -> mono -> mono Source #

Instances

MonoZipWithKey ByteString Source #

Since: 0.1.0

MonoZipWithKey ByteString Source #

Since: 0.1.0

MonoZipWithKey Text Source #

Since: 0.1.0

MonoZipWithKey Text Source #

Since: 0.1.0

MonoZipWithKey [a] Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey [a] -> Element [a] -> Element [a] -> Element [a]) -> [a] -> [a] -> [a] Source #

MonoZipWithKey (Maybe a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Maybe a) -> Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Maybe a -> Maybe a Source #

MonoZipWithKey (IO a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (IO a) -> Element (IO a) -> Element (IO a) -> Element (IO a)) -> IO a -> IO a -> IO a Source #

MonoZipWithKey (Option a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Option a) -> Element (Option a) -> Element (Option a) -> Element (Option a)) -> Option a -> Option a -> Option a Source #

MonoZipWithKey (NonEmpty a) Source #

Since: 0.1.0

MonoZipWithKey (ZipList a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (ZipList a) -> Element (ZipList a) -> Element (ZipList a) -> Element (ZipList a)) -> ZipList a -> ZipList a -> ZipList a Source #

MonoZipWithKey (Identity a) Source #

Since: 0.1.0

MonoZipWithKey (IntMap a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (IntMap a) -> Element (IntMap a) -> Element (IntMap a) -> Element (IntMap a)) -> IntMap a -> IntMap a -> IntMap a Source #

MonoZipWithKey (Tree a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Tree a) -> Element (Tree a) -> Element (Tree a) -> Element (Tree a)) -> Tree a -> Tree a -> Tree a Source #

MonoZipWithKey (Seq a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Seq a) -> Element (Seq a) -> Element (Seq a) -> Element (Seq a)) -> Seq a -> Seq a -> Seq a Source #

MonoZipWithKey (ViewL a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (ViewL a) -> Element (ViewL a) -> Element (ViewL a) -> Element (ViewL a)) -> ViewL a -> ViewL a -> ViewL a Source #

MonoZipWithKey (ViewR a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (ViewR a) -> Element (ViewR a) -> Element (ViewR a) -> Element (ViewR a)) -> ViewR a -> ViewR a -> ViewR a Source #

Unbox a => MonoZipWithKey (Vector a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a -> Vector a Source #

Storable a => MonoZipWithKey (Vector a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a -> Vector a Source #

MonoZipWithKey (Vector a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Vector a) -> Element (Vector a) -> Element (Vector a) -> Element (Vector a)) -> Vector a -> Vector a -> Vector a Source #

MonoZipWithKey (r -> a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (r -> a) -> Element (r -> a) -> Element (r -> a) -> Element (r -> a)) -> (r -> a) -> (r -> a) -> r -> a Source #

MonoZipWithKey (Either a b) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Either a b) -> Element (Either a b) -> Element (Either a b) -> Element (Either a b)) -> Either a b -> Either a b -> Either a b Source #

MonoZipWithKey (a, b) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (a, b) -> Element (a, b) -> Element (a, b) -> Element (a, b)) -> (a, b) -> (a, b) -> (a, b) Source #

MonoZipWithKey (Arg a b) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Arg a b) -> Element (Arg a b) -> Element (Arg a b) -> Element (Arg a b)) -> Arg a b -> Arg a b -> Arg a b Source #

Monad m => MonoZipWithKey (WrappedMonad m a) Source #

Since: 0.1.0

Ord k => MonoZipWithKey (Map k v) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Map k v) -> Element (Map k v) -> Element (Map k v) -> Element (Map k v)) -> Map k v -> Map k v -> Map k v Source #

Monad m => MonoZipWithKey (MaybeT m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (MaybeT m a) -> Element (MaybeT m a) -> Element (MaybeT m a) -> Element (MaybeT m a)) -> MaybeT m a -> MaybeT m a -> MaybeT m a Source #

Applicative m => MonoZipWithKey (ListT m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (ListT m a) -> Element (ListT m a) -> Element (ListT m a) -> Element (ListT m a)) -> ListT m a -> ListT m a -> ListT m a Source #

(Eq k, Hashable k) => MonoZipWithKey (HashMap k v) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v) -> Element (HashMap k v)) -> HashMap k v -> HashMap k v -> HashMap k v Source #

Arrow a => MonoZipWithKey (WrappedArrow a b c) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (WrappedArrow a b c) -> Element (WrappedArrow a b c) -> Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> WrappedArrow a b c -> WrappedArrow a b c -> WrappedArrow a b c Source #

MonoZipWithKey (Const * m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Const * m a) -> Element (Const * m a) -> Element (Const * m a) -> Element (Const * m a)) -> Const * m a -> Const * m a -> Const * m a Source #

Applicative m => MonoZipWithKey (IdentityT * m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (IdentityT * m a) -> Element (IdentityT * m a) -> Element (IdentityT * m a) -> Element (IdentityT * m a)) -> IdentityT * m a -> IdentityT * m a -> IdentityT * m a Source #

Applicative m => MonoZipWithKey (StateT s m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a -> StateT s m a Source #

Applicative m => MonoZipWithKey (StateT s m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a) -> Element (StateT s m a)) -> StateT s m a -> StateT s m a -> StateT s m a Source #

(Applicative m, Monoid w) => MonoZipWithKey (WriterT w m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a -> WriterT w m a Source #

(Applicative m, Monoid w) => MonoZipWithKey (WriterT w m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a) -> Element (WriterT w m a)) -> WriterT w m a -> WriterT w m a -> WriterT w m a Source #

(ZipWithKey f, ZipWithKey g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoZipWithKey (Product * f g a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Product * f g a) -> Element (Product * f g a) -> Element (Product * f g a) -> Element (Product * f g a)) -> Product * f g a -> Product * f g a -> Product * f g a Source #

Functor m => MonoZipWithKey (ContT * r m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (ContT * r m a) -> Element (ContT * r m a) -> Element (ContT * r m a) -> Element (ContT * r m a)) -> ContT * r m a -> ContT * r m a -> ContT * r m a Source #

(Applicative m, ZipWithKey m) => MonoZipWithKey (ReaderT * r m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (ReaderT * r m a) -> Element (ReaderT * r m a) -> Element (ReaderT * r m a) -> Element (ReaderT * r m a)) -> ReaderT * r m a -> ReaderT * r m a -> ReaderT * r m a Source #

(ZipWithKey f, ZipWithKey g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoZipWithKey (Compose * * f g a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (Compose * * f g a) -> Element (Compose * * f g a) -> Element (Compose * * f g a) -> Element (Compose * * f g a)) -> Compose * * f g a -> Compose * * f g a -> Compose * * f g a Source #

(Applicative m, Semigroup w) => MonoZipWithKey (RWST r w s m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

(Applicative m, Semigroup w) => MonoZipWithKey (RWST r w s m a) Source #

Since: 0.1.0

Methods

ozipWithKey :: (MonoKey (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a) -> Element (RWST r w s m a)) -> RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

Monomorphic Indexing / Querries

class MonoLookup mono => MonoIndexable mono where Source #

Monomorphic container that can be indexed by a key for an element.

Minimal complete definition

oindex

Methods

oindex :: mono -> MonoKey mono -> Element mono Source #

oindex :: (Indexable f, Element (f a) ~ a, MonoKey (f a) ~ Key f, f a ~ mono) => mono -> MonoKey mono -> Element mono Source #

Instances

MonoIndexable ByteString Source #

Since: 0.1.0

MonoIndexable ByteString Source #

Since: 0.1.0

MonoIndexable IntSet Source #

Since: 0.1.0

MonoIndexable Text Source #

Since: 0.1.0

MonoIndexable Text Source #

Since: 0.1.0

MonoIndexable [a] Source #

Since: 0.1.0

Methods

oindex :: [a] -> MonoKey [a] -> Element [a] Source #

MonoIndexable (Maybe a) Source #

Since: 0.1.0

Methods

oindex :: Maybe a -> MonoKey (Maybe a) -> Element (Maybe a) Source #

MonoIndexable (Option a) Source #

Since: 0.1.0

Methods

oindex :: Option a -> MonoKey (Option a) -> Element (Option a) Source #

MonoIndexable (NonEmpty a) Source #

Since: 0.1.0

MonoIndexable (ZipList a) Source #

Since: 0.1.0

Methods

oindex :: ZipList a -> MonoKey (ZipList a) -> Element (ZipList a) Source #

MonoIndexable (Identity a) Source #

Since: 0.1.0

MonoIndexable (IntMap a) Source #

Since: 0.1.0

Methods

oindex :: IntMap a -> MonoKey (IntMap a) -> Element (IntMap a) Source #

MonoIndexable (Tree a) Source #

Since: 0.1.0

Methods

oindex :: Tree a -> MonoKey (Tree a) -> Element (Tree a) Source #

MonoIndexable (Seq a) Source #

Since: 0.1.0

Methods

oindex :: Seq a -> MonoKey (Seq a) -> Element (Seq a) Source #

MonoIndexable (ViewL a) Source #

Since: 0.1.0

Methods

oindex :: ViewL a -> MonoKey (ViewL a) -> Element (ViewL a) Source #

MonoIndexable (ViewR a) Source #

Since: 0.1.0

Methods

oindex :: ViewR a -> MonoKey (ViewR a) -> Element (ViewR a) Source #

Ord a => MonoIndexable (Set a) Source #

Since: 0.1.0

Methods

oindex :: Set a -> MonoKey (Set a) -> Element (Set a) Source #

MonoIndexable (HashSet v) Source #

Since: 0.1.0

Methods

oindex :: HashSet v -> MonoKey (HashSet v) -> Element (HashSet v) Source #

Unbox a => MonoIndexable (Vector a) Source #

Since: 0.1.0

Methods

oindex :: Vector a -> MonoKey (Vector a) -> Element (Vector a) Source #

Storable a => MonoIndexable (Vector a) Source #

Since: 0.1.0

Methods

oindex :: Vector a -> MonoKey (Vector a) -> Element (Vector a) Source #

MonoIndexable (Vector a) Source #

Since: 0.1.0

Methods

oindex :: Vector a -> MonoKey (Vector a) -> Element (Vector a) Source #

MonoIndexable (Either a b) Source #

Since: 0.1.0

Methods

oindex :: Either a b -> MonoKey (Either a b) -> Element (Either a b) Source #

MonoIndexable (a, b) Source #

Since: 0.1.0

Methods

oindex :: (a, b) -> MonoKey (a, b) -> Element (a, b) Source #

MonoIndexable (Arg a b) Source #

Since: 0.1.0

Methods

oindex :: Arg a b -> MonoKey (Arg a b) -> Element (Arg a b) Source #

Ord k => MonoIndexable (Map k v) Source #

Since: 0.1.0

Methods

oindex :: Map k v -> MonoKey (Map k v) -> Element (Map k v) Source #

(Eq k, Hashable k) => MonoIndexable (HashMap k v) Source #

Since: 0.1.0

Methods

oindex :: HashMap k v -> MonoKey (HashMap k v) -> Element (HashMap k v) Source #

(Indexable f, Indexable g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoIndexable (Product * f g a) Source #

Since: 0.1.0

Methods

oindex :: Product * f g a -> MonoKey (Product * f g a) -> Element (Product * f g a) Source #

Indexable m => MonoIndexable (ReaderT * r m a) Source #

Since: 0.1.0

Methods

oindex :: ReaderT * r m a -> MonoKey (ReaderT * r m a) -> Element (ReaderT * r m a) Source #

(Indexable f, Indexable g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoIndexable (Compose * * f g a) Source #

Since: 0.1.0

Methods

oindex :: Compose * * f g a -> MonoKey (Compose * * f g a) -> Element (Compose * * f g a) Source #

class MonoLookup mono where Source #

Monomorphic container that can be querried by a key for an element.

Minimal complete definition

olookup

Methods

olookup :: MonoKey mono -> mono -> Maybe (Element mono) Source #

olookup :: (Lookup f, Element (f a) ~ a, MonoKey (f a) ~ Key f, f a ~ mono) => MonoKey mono -> mono -> Maybe (Element mono) Source #

Instances

MonoLookup ByteString Source #

Since: 0.1.0

MonoLookup ByteString Source #

Since: 0.1.0

MonoLookup IntSet Source #

Since: 0.1.0

MonoLookup Text Source #

Since: 0.1.0

MonoLookup Text Source #

Since: 0.1.0

MonoLookup [a] Source #

Since: 0.1.0

Methods

olookup :: MonoKey [a] -> [a] -> Maybe (Element [a]) Source #

MonoLookup (Maybe a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Maybe a) -> Maybe a -> Maybe (Element (Maybe a)) Source #

MonoLookup (Option a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Option a) -> Option a -> Maybe (Element (Option a)) Source #

MonoLookup (NonEmpty a) Source #

Since: 0.1.0

MonoLookup (ZipList a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (ZipList a) -> ZipList a -> Maybe (Element (ZipList a)) Source #

MonoLookup (Identity a) Source #

Since: 0.1.0

MonoLookup (IntMap a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (IntMap a) -> IntMap a -> Maybe (Element (IntMap a)) Source #

MonoLookup (Tree a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Tree a) -> Tree a -> Maybe (Element (Tree a)) Source #

MonoLookup (Seq a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Seq a) -> Seq a -> Maybe (Element (Seq a)) Source #

MonoLookup (ViewL a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (ViewL a) -> ViewL a -> Maybe (Element (ViewL a)) Source #

MonoLookup (ViewR a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (ViewR a) -> ViewR a -> Maybe (Element (ViewR a)) Source #

Ord a => MonoLookup (Set a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Set a) -> Set a -> Maybe (Element (Set a)) Source #

MonoLookup (HashSet v) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (HashSet v) -> HashSet v -> Maybe (Element (HashSet v)) Source #

Unbox a => MonoLookup (Vector a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Vector a) -> Vector a -> Maybe (Element (Vector a)) Source #

Storable a => MonoLookup (Vector a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Vector a) -> Vector a -> Maybe (Element (Vector a)) Source #

MonoLookup (Vector a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Vector a) -> Vector a -> Maybe (Element (Vector a)) Source #

MonoLookup (Either a b) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Either a b) -> Either a b -> Maybe (Element (Either a b)) Source #

MonoLookup (a, b) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (a, b) -> (a, b) -> Maybe (Element (a, b)) Source #

MonoLookup (Arg a b) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Arg a b) -> Arg a b -> Maybe (Element (Arg a b)) Source #

Ord k => MonoLookup (Map k v) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Map k v) -> Map k v -> Maybe (Element (Map k v)) Source #

(Eq k, Hashable k) => MonoLookup (HashMap k v) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (HashMap k v) -> HashMap k v -> Maybe (Element (HashMap k v)) Source #

(Lookup f, Lookup g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoLookup (Product * f g a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Product * f g a) -> Product * f g a -> Maybe (Element (Product * f g a)) Source #

Lookup m => MonoLookup (ReaderT * r m a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (ReaderT * r m a) -> ReaderT * r m a -> Maybe (Element (ReaderT * r m a)) Source #

(Lookup f, Lookup g, (~) * (MonoKey (f a)) (Key f), (~) * (MonoKey (g a)) (Key g)) => MonoLookup (Compose * * f g a) Source #

Since: 0.1.0

Methods

olookup :: MonoKey (Compose * * f g a) -> Compose * * f g a -> Maybe (Element (Compose * * f g a)) Source #

Monomorphic unwrapping with key

ofoldlWithKeyUnwrap :: MonoFoldableWithKey mono => (x -> Element mono -> x) -> x -> (x -> b) -> mono -> b Source #

A strict left fold, together with an unwrap function.

This is convenient when the accumulator value is not the same as the final expected type. It is provided mainly for integration with the foldl package, to be used in conjunction with purely.

Since: 0.1.0

ofoldWithKeyMUnwrap :: (Monad m, MonoFoldableWithKey mono) => (x -> Element mono -> m x) -> m x -> (x -> m b) -> mono -> m b Source #

A monadic strict left fold, together with an unwrap function.

Similar to foldlUnwrap, but allows monadic actions. To be used with impurely from foldl.

Since: 0.1.0