Safe Haskell | None |
---|---|

Language | Haskell2010 |

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

## Manipulating these sets

emptyUniqDSet :: UniqDSet a Source #

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

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

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

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

sizeUniqDSet :: UniqDSet a -> Int Source #

isEmptyUniqDSet :: UniqDSet a -> Bool Source #

uniqDSetToList :: UniqDSet a -> [a] Source #