-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Associative containers retating insertion order for traversals.
--   
--   Associative containers retating insertion order for traversals.
@package insert-ordered-containers
@version 0.2.1.0


-- | <a>InsOrdHashMap</a> is like <a>HashMap</a>, but it folds and
--   traverses in insertion order.
--   
--   This module interface mimics <a>Data.HashMap.Strict</a>, with some
--   additions.
module Data.HashMap.Strict.InsOrd

-- | <a>HashMap</a> which tries it's best to remember insertion order of
--   elements.
data InsOrdHashMap k v
empty :: InsOrdHashMap k v
singleton :: Hashable k => k -> v -> InsOrdHashMap k v
null :: InsOrdHashMap k v -> Bool
size :: InsOrdHashMap k v -> Int
member :: (Eq k, Hashable k) => k -> InsOrdHashMap k a -> Bool
lookup :: (Eq k, Hashable k) => k -> InsOrdHashMap k v -> Maybe v
lookupDefault :: (Eq k, Hashable k) => v -> k -> InsOrdHashMap k v -> v
insert :: (Eq k, Hashable k) => k -> v -> InsOrdHashMap k v -> InsOrdHashMap k v
insertWith :: (Eq k, Hashable k) => (v -> v -> v) -> k -> v -> InsOrdHashMap k v -> InsOrdHashMap k v
delete :: (Eq k, Hashable k) => k -> InsOrdHashMap k v -> InsOrdHashMap k v
adjust :: (Eq k, Hashable k) => (v -> v) -> k -> InsOrdHashMap k v -> InsOrdHashMap k v
update :: (Eq k, Hashable k) => (a -> Maybe a) -> k -> InsOrdHashMap k a -> InsOrdHashMap k a
alter :: (Eq k, Hashable k) => (Maybe v -> Maybe v) -> k -> InsOrdHashMap k v -> InsOrdHashMap k v
union :: (Eq k, Hashable k) => InsOrdHashMap k v -> InsOrdHashMap k v -> InsOrdHashMap k v

-- | The union of two maps. If a key occurs in both maps, the provided
--   function (first argument) will be used to compute the result.
--   
--   Ordered traversal will go thru keys in the first map first.
unionWith :: (Eq k, Hashable k) => (v -> v -> v) -> InsOrdHashMap k v -> InsOrdHashMap k v -> InsOrdHashMap k v
unionWithKey :: (Eq k, Hashable k) => (k -> v -> v -> v) -> InsOrdHashMap k v -> InsOrdHashMap k v -> InsOrdHashMap k v
unions :: (Eq k, Hashable k, Foldable f) => f (InsOrdHashMap k v) -> InsOrdHashMap k v
map :: (v1 -> v2) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2

-- | Order preserving mapping of keys.
mapKeys :: (Eq k', Hashable k') => (k -> k') -> InsOrdHashMap k v -> InsOrdHashMap k' v
traverseKeys :: (Eq k', Hashable k', Applicative f) => (k -> f k') -> InsOrdHashMap k v -> f (InsOrdHashMap k' v)
mapWithKey :: (k -> v1 -> v2) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2
traverseWithKey :: Applicative f => (k -> a -> f b) -> InsOrdHashMap k a -> f (InsOrdHashMap k b)

-- | More efficient than <a>traverse</a>, when traversing in insertion
--   order is not important.
unorderedTraverse :: Applicative f => (a -> f b) -> InsOrdHashMap k a -> f (InsOrdHashMap k b)

-- | More efficient than <a>traverseWithKey</a>, when traversing in
--   insertion order is not important.
unorderedTraverseWithKey :: Applicative f => (k -> a -> f b) -> InsOrdHashMap k a -> f (InsOrdHashMap k b)
difference :: (Eq k, Hashable k) => InsOrdHashMap k v -> InsOrdHashMap k w -> InsOrdHashMap k v
intersection :: (Eq k, Hashable k) => InsOrdHashMap k v -> InsOrdHashMap k w -> InsOrdHashMap k v
intersectionWith :: (Eq k, Hashable k) => (v1 -> v2 -> v3) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2 -> InsOrdHashMap k v3
intersectionWithKey :: (Eq k, Hashable k) => (k -> v1 -> v2 -> v3) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2 -> InsOrdHashMap k v3
foldl' :: (a -> v -> a) -> a -> InsOrdHashMap k v -> a
foldlWithKey' :: (a -> k -> v -> a) -> a -> InsOrdHashMap k v -> a
foldr :: (v -> a -> a) -> a -> InsOrdHashMap k v -> a
foldrWithKey :: (k -> v -> a -> a) -> a -> InsOrdHashMap k v -> a
foldMapWithKey :: Monoid m => (k -> a -> m) -> InsOrdHashMap k a -> m

-- | More efficient than <a>foldMap</a>, when folding in insertion order is
--   not important.
unorderedFoldMap :: Monoid m => (a -> m) -> InsOrdHashMap k a -> m

-- | More efficient than <a>foldMapWithKey</a>, when folding in insertion
--   order is not important.
unorderedFoldMapWithKey :: Monoid m => (k -> a -> m) -> InsOrdHashMap k a -> m
filter :: (v -> Bool) -> InsOrdHashMap k v -> InsOrdHashMap k v
filterWithKey :: (k -> v -> Bool) -> InsOrdHashMap k v -> InsOrdHashMap k v
mapMaybe :: (v1 -> Maybe v2) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2
mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> InsOrdHashMap k v1 -> InsOrdHashMap k v2
keys :: InsOrdHashMap k v -> [k]
elems :: InsOrdHashMap k v -> [v]
toList :: InsOrdHashMap k v -> [(k, v)]
toRevList :: InsOrdHashMap k v -> [(k, v)]
fromList :: forall k v. (Eq k, Hashable k) => [(k, v)] -> InsOrdHashMap k v
toHashMap :: InsOrdHashMap k v -> HashMap k v
fromHashMap :: HashMap k v -> InsOrdHashMap k v

-- | This is a slight lie, as roundtrip doesn't preserve ordering.
hashMap :: Iso (InsOrdHashMap k a) (InsOrdHashMap k b) (HashMap k a) (HashMap k b)
unorderedTraversal :: Traversal (InsOrdHashMap k a) (InsOrdHashMap k b) a b

-- | Test if the internal map structure is valid.
valid :: InsOrdHashMap k v -> Bool
instance (Data.Hashable.Class.Hashable k, GHC.Classes.Eq k, Data.Data.Data v, Data.Data.Data k) => Data.Data.Data (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance GHC.Base.Functor (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance Data.Data.Data a => Data.Data.Data (Data.HashMap.Strict.InsOrd.P a)
instance Data.Traversable.Traversable Data.HashMap.Strict.InsOrd.P
instance Data.Foldable.Foldable Data.HashMap.Strict.InsOrd.P
instance GHC.Base.Functor Data.HashMap.Strict.InsOrd.P
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.HashMap.Strict.InsOrd.P a)
instance GHC.Show.Show a => GHC.Show.Show (Data.HashMap.Strict.InsOrd.P a)
instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Data.HashMap.Strict.InsOrd.P a)
instance (GHC.Classes.Eq k, GHC.Classes.Eq v) => GHC.Classes.Eq (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Show.Show k, GHC.Show.Show v) => GHC.Show.Show (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k, GHC.Read.Read k, GHC.Read.Read v) => GHC.Read.Read (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Data.Semigroup.Semigroup (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => GHC.Base.Monoid (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance Data.Foldable.Foldable (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance Data.Traversable.Traversable (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Data.Functor.Bind.Class.Apply (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Data.Functor.Bind.Class.Bind (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (Data.Hashable.Class.Hashable k, Data.Hashable.Class.Hashable v) => Data.Hashable.Class.Hashable (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => GHC.Exts.IsList (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance Data.Aeson.Types.ToJSON.ToJSONKey k => Data.Aeson.Types.ToJSON.ToJSON1 (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (Data.Aeson.Types.ToJSON.ToJSONKey k, Data.Aeson.Types.ToJSON.ToJSON v) => Data.Aeson.Types.ToJSON.ToJSON (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k, Data.Aeson.Types.FromJSON.FromJSONKey k) => Data.Aeson.Types.FromJSON.FromJSON1 (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k, Data.Aeson.Types.FromJSON.FromJSONKey k, Data.Aeson.Types.FromJSON.FromJSON v) => Data.Aeson.Types.FromJSON.FromJSON (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Control.Lens.At.Ixed (Data.HashMap.Strict.InsOrd.InsOrdHashMap k v)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Control.Lens.At.At (Data.HashMap.Strict.InsOrd.InsOrdHashMap k a)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Control.Lens.Indexed.FunctorWithIndex k (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Control.Lens.Indexed.FoldableWithIndex k (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance (GHC.Classes.Eq k, Data.Hashable.Class.Hashable k) => Control.Lens.Indexed.TraversableWithIndex k (Data.HashMap.Strict.InsOrd.InsOrdHashMap k)
instance GHC.Base.Functor (Data.HashMap.Strict.InsOrd.SortedAp f)
instance GHC.Base.Applicative (Data.HashMap.Strict.InsOrd.SortedAp f)
