Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data UniqDFM ele
- emptyUDFM :: UniqDFM elt
- unitUDFM :: Uniquable key => key -> elt -> UniqDFM elt
- addToUDFM :: Uniquable key => UniqDFM elt -> key -> elt -> UniqDFM elt
- delFromUDFM :: Uniquable key => UniqDFM elt -> key -> UniqDFM elt
- delListFromUDFM :: Uniquable key => UniqDFM elt -> [key] -> UniqDFM elt
- adjustUDFM :: Uniquable key => (elt -> elt) -> UniqDFM elt -> key -> UniqDFM elt
- alterUDFM :: Uniquable key => (Maybe elt -> Maybe elt) -> UniqDFM elt -> key -> UniqDFM elt
- mapUDFM :: (elt1 -> elt2) -> UniqDFM elt1 -> UniqDFM elt2
- plusUDFM :: UniqDFM elt -> UniqDFM elt -> UniqDFM elt
- lookupUDFM :: Uniquable key => UniqDFM elt -> key -> Maybe elt
- elemUDFM :: Uniquable key => key -> UniqDFM elt -> Bool
- foldUDFM :: (elt -> a -> a) -> a -> UniqDFM elt -> a
- eltsUDFM :: UniqDFM elt -> [elt]
- filterUDFM :: (elt -> Bool) -> UniqDFM elt -> UniqDFM elt
- isNullUDFM :: UniqDFM elt -> Bool
- sizeUDFM :: UniqDFM elt -> Int
- intersectUDFM :: UniqDFM elt -> UniqDFM elt -> UniqDFM elt
- intersectsUDFM :: UniqDFM elt -> UniqDFM elt -> Bool
- disjointUDFM :: UniqDFM elt -> UniqDFM elt -> Bool
- minusUDFM :: UniqDFM elt1 -> UniqDFM elt2 -> UniqDFM elt1
- partitionUDFM :: (elt -> Bool) -> UniqDFM elt -> (UniqDFM elt, UniqDFM elt)
- udfmToList :: UniqDFM elt -> [(Unique, elt)]
- udfmToUfm :: UniqDFM elt -> UniqFM elt
- alwaysUnsafeUfmToUdfm :: UniqFM elt -> UniqDFM elt
Unique-keyed deterministic mappings
Type of unique deterministic finite maps
Manipulating those mappings
delListFromUDFM :: Uniquable key => UniqDFM elt -> [key] -> UniqDFM elt Source #
Delete a list of elements from a UniqDFM
adjustUDFM :: Uniquable key => (elt -> elt) -> UniqDFM elt -> key -> UniqDFM elt Source #
Apply a function to a particular element
alterUDFM :: Uniquable key => (Maybe elt -> Maybe elt) -> UniqDFM elt -> key -> UniqDFM elt Source #
The expression (alterUDFM f k map) alters value x at k, or absence thereof. alterUDFM can be used to insert, delete, or update a value in UniqDFM. Use addToUDFM, delFromUDFM or adjustUDFM when possible, they are more efficient.
mapUDFM :: (elt1 -> elt2) -> UniqDFM elt1 -> UniqDFM elt2 Source #
Map a function over every value in a UniqDFM
foldUDFM :: (elt -> a -> a) -> a -> UniqDFM elt -> a Source #
Performs a deterministic fold over the UniqDFM.
It's O(n log n) while the corresponding function on UniqFM
is O(n).
isNullUDFM :: UniqDFM elt -> Bool Source #
partitionUDFM :: (elt -> Bool) -> UniqDFM elt -> (UniqDFM elt, UniqDFM elt) Source #
Partition UniqDFM into two UniqDFMs according to the predicate
udfmToList :: UniqDFM elt -> [(Unique, elt)] Source #
udfmToUfm :: UniqDFM elt -> UniqFM elt Source #
This allows for lossy conversion from UniqDFM to UniqFM
alwaysUnsafeUfmToUdfm :: UniqFM elt -> UniqDFM elt Source #