-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Set- and Map-like types that remember the order elements were inserted
--
-- Set- and Map-like types that remember the order elements were inserted
@package ordered-containers
@version 0.0
-- | An OSet behaves much like a Set, with all the same
-- asymptotics, but also remembers the order that values were inserted.
module Data.Set.Ordered
data OSet a
empty :: OSet a
singleton :: a -> OSet a
(<|) :: Ord a => a -> OSet a -> OSet a
infixr 5 <|
(|<) :: Ord a => a -> OSet a -> OSet a
infixr 5 |<
(>|) :: Ord a => OSet a -> a -> OSet a
infixl 5 >|
(|>) :: Ord a => OSet a -> a -> OSet a
infixl 5 |>
(<>|) :: Ord a => OSet a -> OSet a -> OSet a
infixr 6 <>|
(|<>) :: Ord a => OSet a -> OSet a -> OSet a
infixr 6 |<>
null :: OSet a -> Bool
size :: OSet a -> Int
member :: Ord a => a -> OSet a -> Bool
notMember :: Ord a => a -> OSet a -> Bool
delete :: Ord a => a -> OSet a -> OSet a
filter :: (a -> Bool) -> OSet a -> OSet a
-- | Set difference: r \\ s deletes all the values in s
-- from r. The order of r is unchanged.
(\\) :: Ord a => OSet a -> OSet a -> OSet a
-- | A 0-based index, much like the indices used by lists' !!
-- operation. All indices are with respect to insertion order.
type Index = Int
findIndex :: Ord a => a -> OSet a -> Maybe Index
elemAt :: OSet a -> Index -> Maybe a
-- | If a value occurs multiple times, only the first occurrence is used.
fromList :: Ord a => [a] -> OSet a
-- | Returns values in ascending order. (Use toList to return them
-- in insertion order.)
toAscList :: OSet a -> [a]
instance Data.Foldable.Foldable Data.Set.Ordered.OSet
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Set.Ordered.OSet a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Set.Ordered.OSet a)
instance GHC.Show.Show a => GHC.Show.Show (Data.Set.Ordered.OSet a)
instance (GHC.Classes.Ord a, GHC.Read.Read a) => GHC.Read.Read (Data.Set.Ordered.OSet a)
-- | An OMap behaves much like a Map, with all the same
-- asymptotics, but also remembers the order that keys were inserted.
module Data.Map.Ordered
data OMap k v
empty :: OMap k v
singleton :: (k, v) -> OMap k v
(<|) :: Ord k => (,) k v -> OMap k v -> OMap k v
infixr 5 <|
(|<) :: Ord k => (,) k v -> OMap k v -> OMap k v
infixr 5 |<
(>|) :: Ord k => OMap k v -> (,) k v -> OMap k v
infixl 5 >|
(|>) :: Ord k => OMap k v -> (,) k v -> OMap k v
infixl 5 |>
delete :: Ord k => k -> OMap k v -> OMap k v
-- | filter f m contains exactly the key-value pairs of m
-- that satisfy f, without changing the order they appear
filter :: (k -> v -> Bool) -> OMap k v -> OMap k v
-- | m \\ n deletes all the keys that exist in n from
-- m
(\\) :: Ord k => OMap k v -> OMap k v' -> OMap k v
null :: OMap k v -> Bool
size :: OMap k v -> Int
member :: Ord k => k -> OMap k v -> Bool
notMember :: Ord k => k -> OMap k v -> Bool
lookup :: Ord k => k -> OMap k v -> Maybe v
-- | A 0-based index, much like the indices used by lists' !!
-- operation. All indices are with respect to insertion order.
type Index = Int
findIndex :: Ord k => k -> OMap k v -> Maybe Index
elemAt :: OMap k v -> Index -> Maybe (k, v)
-- | If a key appears multiple times, the first occurrence is used for
-- ordering and the last occurrence is used for its value. The library
-- author welcomes comments on whether this default is sane.
fromList :: Ord k => [(k, v)] -> OMap k v
-- | Return key-value pairs in the order they were inserted.
assocs :: OMap k v -> [(k, v)]
-- | Return key-value pairs in order of increasing key.
toAscList :: OMap k v -> [(k, v)]
instance Data.Foldable.Foldable (Data.Map.Ordered.OMap k)
instance (GHC.Classes.Eq k, GHC.Classes.Eq v) => GHC.Classes.Eq (Data.Map.Ordered.OMap k v)
instance (GHC.Classes.Ord k, GHC.Classes.Ord v) => GHC.Classes.Ord (Data.Map.Ordered.OMap k v)
instance (GHC.Show.Show k, GHC.Show.Show v) => GHC.Show.Show (Data.Map.Ordered.OMap k v)
instance (GHC.Classes.Ord k, GHC.Read.Read k, GHC.Read.Read v) => GHC.Read.Read (Data.Map.Ordered.OMap k v)