Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Generic multimap module.
- data Multimap k c v
- class Foldable c => Collection c
- null :: Multimap k c v -> Bool
- size :: Collection c => Multimap k c v -> Int
- empty :: Multimap k c v
- singleton :: (Collection c, Ord k) => k -> v -> Multimap k c v
- fromMap :: Collection c => Map k (c v) -> Multimap k c v
- fromList :: (Collection c, Semigroup (c v), Ord k) => [(k, v)] -> Multimap k c v
- (!) :: (Collection c, Ord k) => Multimap k c v -> k -> c v
- insert :: (Ord k, Collection c, Semigroup (c v)) => k -> v -> Multimap k c v -> Multimap k c v
- insertAll :: (Ord k, Semigroup (c v)) => k -> c v -> Multimap k c v -> Multimap k c v
- deleteAll :: Ord k => k -> Multimap k c v -> Multimap k c v
- filter :: (Collection c, Semigroup (c v), Ord k) => (v -> Bool) -> Multimap k c v -> Multimap k c v
- filterWithKey :: (Collection c, Semigroup (c v), Ord k) => (k -> v -> Bool) -> Multimap k c v -> Multimap k c v
- union :: (Ord k, Semigroup (c v)) => Multimap k c v -> Multimap k c v -> Multimap k c v
- toMap :: Multimap k c v -> Map k (c v)
- toMapWith :: (c v -> a) -> Multimap k c v -> Map k a
- toList :: Collection c => Multimap k c v -> [(k, v)]
- keysSet :: Multimap k c v -> Set k
- lift1 :: (Ord k, Collection c) => (c v -> c v) -> k -> Multimap k c v -> Multimap k c v
Documentation
Functor c => Functor (Multimap k c) Source # | |
(Eq (c v), Eq k) => Eq (Multimap k c v) Source # | |
(Ord (c v), Ord k) => Ord (Multimap k c v) Source # | |
(Read (c v), Read k, Ord k) => Read (Multimap k c v) Source # | |
(Show (c v), Show k) => Show (Multimap k c v) Source # | |
(Ord k, Semigroup (c v)) => Semigroup (Multimap k c v) Source # | |
(Ord k, Semigroup (c v)) => Monoid (Multimap k c v) Source # | |
class Foldable c => Collection c Source #
Tests
Construction
Access
insert :: (Ord k, Collection c, Semigroup (c v)) => k -> v -> Multimap k c v -> Multimap k c v Source #
Modification
filter :: (Collection c, Semigroup (c v), Ord k) => (v -> Bool) -> Multimap k c v -> Multimap k c v Source #
filterWithKey :: (Collection c, Semigroup (c v), Ord k) => (k -> v -> Bool) -> Multimap k c v -> Multimap k c v Source #
Extraction
toList :: Collection c => Multimap k c v -> [(k, v)] Source #