Safe Haskell | None |
---|---|
Language | Haskell2010 |
Warning: This module should be considered highly experimental.
- class (Monoid set, Semigroup set, MonoFoldable set, Eq (ContainerKey set), GrowingAppend set) => SetContainer set where
- type ContainerKey set
- member :: ContainerKey set -> set -> Bool
- notMember :: ContainerKey set -> set -> Bool
- union :: set -> set -> set
- difference :: set -> set -> set
- intersection :: set -> set -> set
- class PolyMap map where
- differenceMap :: map value1 -> map value2 -> map value1
- intersectionMap :: map value1 -> map value2 -> map value1
- intersectionWithMap :: (value1 -> value2 -> value3) -> map value1 -> map value2 -> map value3
- class (MonoTraversable map, SetContainer map) => IsMap map where
- type MapValue map
- lookup :: ContainerKey map -> map -> Maybe (MapValue map)
- insertMap :: ContainerKey map -> MapValue map -> map -> map
- deleteMap :: ContainerKey map -> map -> map
- singletonMap :: ContainerKey map -> MapValue map -> map
- mapFromList :: [(ContainerKey map, MapValue map)] -> map
- mapToList :: map -> [(ContainerKey map, MapValue map)]
- findWithDefault :: MapValue map -> ContainerKey map -> map -> MapValue map
- insertWith :: (MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map
- insertWithKey :: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map
- insertLookupWithKey :: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> (Maybe (MapValue map), map)
- adjustMap :: (MapValue map -> MapValue map) -> ContainerKey map -> map -> map
- adjustWithKey :: (ContainerKey map -> MapValue map -> MapValue map) -> ContainerKey map -> map -> map
- updateMap :: (MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map
- updateWithKey :: (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map
- updateLookupWithKey :: (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> (Maybe (MapValue map), map)
- alterMap :: (Maybe (MapValue map) -> Maybe (MapValue map)) -> ContainerKey map -> map -> map
- unionWith :: (MapValue map -> MapValue map -> MapValue map) -> map -> map -> map
- unionWithKey :: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> map -> map -> map
- unionsWith :: (MapValue map -> MapValue map -> MapValue map) -> [map] -> map
- mapWithKey :: (ContainerKey map -> MapValue map -> MapValue map) -> map -> map
- mapKeysWith :: (MapValue map -> MapValue map -> MapValue map) -> (ContainerKey map -> ContainerKey map) -> map -> map
- class (SetContainer set, Element set ~ ContainerKey set) => IsSet set where
- insertSet :: Element set -> set -> set
- deleteSet :: Element set -> set -> set
- singletonSet :: Element set -> set
- setFromList :: [Element set] -> set
- setToList :: set -> [Element set]
- class MonoFunctor mono => MonoZip mono where
Documentation
class (Monoid set, Semigroup set, MonoFoldable set, Eq (ContainerKey set), GrowingAppend set) => SetContainer set where Source
type ContainerKey set Source
member :: ContainerKey set -> set -> Bool Source
notMember :: ContainerKey set -> set -> Bool Source
union :: set -> set -> set Source
difference :: set -> set -> set Source
intersection :: set -> set -> set Source
SetContainer IntSet | |
Eq key => SetContainer [(key, value)] | |
SetContainer (IntMap value) | This instance uses the functions from Data.IntMap.Strict. |
Ord element => SetContainer (Set element) | |
(Eq element, Hashable element) => SetContainer (HashSet element) | |
Ord k => SetContainer (Map k v) | This instance uses the functions from Data.Map.Strict. |
(Eq key, Hashable key) => SetContainer (HashMap key value) | This instance uses the functions from Data.HashMap.Strict. |
class PolyMap map where Source
A guaranteed-polymorphic Map
, which allows for more polymorphic versions
of functions.
differenceMap :: map value1 -> map value2 -> map value1 Source
intersectionMap :: map value1 -> map value2 -> map value1 Source
intersectionWithMap :: (value1 -> value2 -> value3) -> map value1 -> map value2 -> map value3 Source
PolyMap IntMap | This instance uses the functions from Data.IntMap.Strict. |
Ord key => PolyMap (Map key) | This instance uses the functions from Data.Map.Strict. |
(Eq key, Hashable key) => PolyMap (HashMap key) | This instance uses the functions from Data.HashMap.Strict. |
class (MonoTraversable map, SetContainer map) => IsMap map where Source
In some cases, MapValue
and Element
will be different, e.g., the
IsMap
instance of associated lists.
lookup :: ContainerKey map -> map -> Maybe (MapValue map) Source
insertMap :: ContainerKey map -> MapValue map -> map -> map Source
deleteMap :: ContainerKey map -> map -> map Source
singletonMap :: ContainerKey map -> MapValue map -> map Source
mapFromList :: [(ContainerKey map, MapValue map)] -> map Source
mapToList :: map -> [(ContainerKey map, MapValue map)] Source
findWithDefault :: MapValue map -> ContainerKey map -> map -> MapValue map Source
insertWith :: (MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map Source
insertWithKey :: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> map Source
insertLookupWithKey :: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> ContainerKey map -> MapValue map -> map -> (Maybe (MapValue map), map) Source
adjustMap :: (MapValue map -> MapValue map) -> ContainerKey map -> map -> map Source
adjustWithKey :: (ContainerKey map -> MapValue map -> MapValue map) -> ContainerKey map -> map -> map Source
updateMap :: (MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map Source
updateWithKey :: (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> map Source
updateLookupWithKey :: (ContainerKey map -> MapValue map -> Maybe (MapValue map)) -> ContainerKey map -> map -> (Maybe (MapValue map), map) Source
alterMap :: (Maybe (MapValue map) -> Maybe (MapValue map)) -> ContainerKey map -> map -> map Source
unionWith :: (MapValue map -> MapValue map -> MapValue map) -> map -> map -> map Source
unionWithKey :: (ContainerKey map -> MapValue map -> MapValue map -> MapValue map) -> map -> map -> map Source
unionsWith :: (MapValue map -> MapValue map -> MapValue map) -> [map] -> map Source
mapWithKey :: (ContainerKey map -> MapValue map -> MapValue map) -> map -> map Source
mapKeysWith :: (MapValue map -> MapValue map -> MapValue map) -> (ContainerKey map -> ContainerKey map) -> map -> map Source
Eq key => IsMap [(key, value)] | |
IsMap (IntMap value) | This instance uses the functions from Data.IntMap.Strict. |
Ord key => IsMap (Map key value) | This instance uses the functions from Data.Map.Strict. |
(Eq key, Hashable key) => IsMap (HashMap key value) | This instance uses the functions from Data.HashMap.Strict. |
class (SetContainer set, Element set ~ ContainerKey set) => IsSet set where Source