UniqDSet

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

UniqDSet

Contents

- Unique set type
  - Manipulating these sets

Description

Specialised deterministic sets, for things with `Uniques`

Based on `UniqDFMs` (as you would expect). See Note [Deterministic UniqFM] in UniqDFM for explanation why we need it.

Basically, the things need to be in class `Uniquable`.

Synopsis

- type UniqDSet a = UniqDFM a
- delOneFromUniqDSet :: Uniquable a => UniqDSet a -> a -> UniqDSet a
- delListFromUniqDSet :: Uniquable a => UniqDSet a -> [a] -> UniqDSet a
- emptyUniqDSet :: UniqDSet a
- unitUniqDSet :: Uniquable a => a -> UniqDSet a
- mkUniqDSet :: Uniquable a => [a] -> UniqDSet a
- addOneToUniqDSet :: Uniquable a => UniqDSet a -> a -> UniqDSet a
- addListToUniqDSet :: Uniquable a => UniqDSet a -> [a] -> UniqDSet a
- unionUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a
- unionManyUniqDSets :: [UniqDSet a] -> UniqDSet a
- minusUniqDSet :: UniqDSet a -> UniqDSet a -> UniqDSet a
- uniqDSetMinusUniqSet :: UniqDSet a -> UniqSet b -> UniqDSet a
- intersectUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a
- uniqDSetIntersectUniqSet :: UniqDSet a -> UniqSet b -> UniqDSet a
- intersectsUniqDSets :: UniqDSet a -> UniqDSet a -> Bool
- foldUniqDSet :: (a -> b -> b) -> b -> UniqDSet a -> b
- elementOfUniqDSet :: Uniquable a => a -> UniqDSet a -> Bool
- filterUniqDSet :: (a -> Bool) -> UniqDSet a -> UniqDSet a
- sizeUniqDSet :: UniqDSet a -> Int
- isEmptyUniqDSet :: UniqDSet a -> Bool
- lookupUniqDSet :: Uniquable a => UniqDSet a -> a -> Maybe a
- uniqDSetToList :: UniqDSet a -> [a]
- partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a)

# Unique set type

type UniqDSet a = UniqDFM a #

## Manipulating these sets

delOneFromUniqDSet :: Uniquable a => UniqDSet a -> a -> UniqDSet a #

delListFromUniqDSet :: Uniquable a => UniqDSet a -> [a] -> UniqDSet a #

emptyUniqDSet :: UniqDSet a #

unitUniqDSet :: Uniquable a => a -> UniqDSet a #

mkUniqDSet :: Uniquable a => [a] -> UniqDSet a #

addOneToUniqDSet :: Uniquable a => UniqDSet a -> a -> UniqDSet a #

addListToUniqDSet :: Uniquable a => UniqDSet a -> [a] -> UniqDSet a #

unionUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a #

unionManyUniqDSets :: [UniqDSet a] -> UniqDSet a #

minusUniqDSet :: UniqDSet a -> UniqDSet a -> UniqDSet a #

uniqDSetMinusUniqSet :: UniqDSet a -> UniqSet b -> UniqDSet a #

intersectUniqDSets :: UniqDSet a -> UniqDSet a -> UniqDSet a #

uniqDSetIntersectUniqSet :: UniqDSet a -> UniqSet b -> UniqDSet a #

intersectsUniqDSets :: UniqDSet a -> UniqDSet a -> Bool #

foldUniqDSet :: (a -> b -> b) -> b -> UniqDSet a -> b #

elementOfUniqDSet :: Uniquable a => a -> UniqDSet a -> Bool #

filterUniqDSet :: (a -> Bool) -> UniqDSet a -> UniqDSet a #

sizeUniqDSet :: UniqDSet a -> Int #

isEmptyUniqDSet :: UniqDSet a -> Bool #

lookupUniqDSet :: Uniquable a => UniqDSet a -> a -> Maybe a #

uniqDSetToList :: UniqDSet a -> [a] #

partitionUniqDSet :: (a -> Bool) -> UniqDSet a -> (UniqDSet a, UniqDSet a) #