UniqSet

ghc-8.4.0.20171214: The GHC API

Safe Haskell | None
Language | Haskell2010

UniqSet

Contents

- Unique set type
  - Manipulating these sets

Synopsis

- data UniqSet a
- getUniqSet :: UniqSet a -> UniqFM a
- pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc
- emptyUniqSet :: UniqSet a
- unitUniqSet :: Uniquable a => a -> UniqSet a
- mkUniqSet :: Uniquable a => [a] -> UniqSet a
- addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a
- delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a
- delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a
- delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a
- unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- unionManyUniqSets :: [UniqSet a] -> UniqSet a
- minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a
- uniqSetMinusUFM :: UniqSet a -> UniqFM b -> UniqSet a
- intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
- restrictUniqSetToUFM :: UniqSet a -> UniqFM b -> UniqSet a
- uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool
- uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool
- elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool
- elemUniqSet_Directly :: Unique -> UniqSet a -> Bool
- filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a
- filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt
- sizeUniqSet :: UniqSet a -> Int
- isEmptyUniqSet :: UniqSet a -> Bool
- lookupUniqSet :: Uniquable a => UniqSet b -> a -> Maybe b
- lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a
- partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a)
- mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b
- unsafeUFMToUniqSet :: UniqFM a -> UniqSet a
- nonDetEltsUniqSet :: UniqSet elt -> [elt]
- nonDetKeysUniqSet :: UniqSet elt -> [Unique]
- nonDetFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a
- nonDetFoldUniqSet_Directly :: (Unique -> elt -> a -> a) -> a -> UniqSet elt -> a

# Unique set type

data UniqSet a Source #

Instances

Eq (UniqSet a) # |
Instance details Methods (==) :: UniqSet a -> UniqSet a -> Bool # (/=) :: UniqSet a -> UniqSet a -> Bool #
Data a => Data (UniqSet a) # |
Instance details Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqSet a -> c (UniqSet a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqSet a) Source # toConstr :: UniqSet a -> Constr Source # dataTypeOf :: UniqSet a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqSet a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqSet a)) Source # gmapT :: (forall b. Data b => b -> b) -> UniqSet a -> UniqSet a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> UniqSet a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqSet a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) Source #
Semigroup (UniqSet a) # |
Instance details Methods (<>) :: UniqSet a -> UniqSet a -> UniqSet a Source # sconcat :: NonEmpty (UniqSet a) -> UniqSet a Source # stimes :: Integral b => b -> UniqSet a -> UniqSet a Source #
Monoid (UniqSet a) # |
Instance details Methods mempty :: UniqSet a Source # mappend :: UniqSet a -> UniqSet a -> UniqSet a Source # mconcat :: [UniqSet a] -> UniqSet a Source #
Outputable a => Outputable (UniqSet a) # |
Instance details Methods ppr :: UniqSet a -> SDoc Source # pprPrec :: Rational -> UniqSet a -> SDoc Source #

getUniqSet :: UniqSet a -> UniqFM a Source #

pprUniqSet :: (a -> SDoc) -> UniqSet a -> SDoc Source #

## Manipulating these sets

emptyUniqSet :: UniqSet a Source #

unitUniqSet :: Uniquable a => a -> UniqSet a Source #

mkUniqSet :: Uniquable a => [a] -> UniqSet a Source #

addOneToUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a Source #

addListToUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a Source #

delOneFromUniqSet :: Uniquable a => UniqSet a -> a -> UniqSet a Source #

delOneFromUniqSet_Directly :: UniqSet a -> Unique -> UniqSet a Source #

delListFromUniqSet :: Uniquable a => UniqSet a -> [a] -> UniqSet a Source #

delListFromUniqSet_Directly :: UniqSet a -> [Unique] -> UniqSet a Source #

unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a Source #

unionManyUniqSets :: [UniqSet a] -> UniqSet a Source #

minusUniqSet :: UniqSet a -> UniqSet a -> UniqSet a Source #

uniqSetMinusUFM :: UniqSet a -> UniqFM b -> UniqSet a Source #

intersectUniqSets :: UniqSet a -> UniqSet a -> UniqSet a Source #

restrictUniqSetToUFM :: UniqSet a -> UniqFM b -> UniqSet a Source #

uniqSetAny :: (a -> Bool) -> UniqSet a -> Bool Source #

uniqSetAll :: (a -> Bool) -> UniqSet a -> Bool Source #

elementOfUniqSet :: Uniquable a => a -> UniqSet a -> Bool Source #

elemUniqSet_Directly :: Unique -> UniqSet a -> Bool Source #

filterUniqSet :: (a -> Bool) -> UniqSet a -> UniqSet a Source #

filterUniqSet_Directly :: (Unique -> elt -> Bool) -> UniqSet elt -> UniqSet elt Source #

sizeUniqSet :: UniqSet a -> Int Source #

isEmptyUniqSet :: UniqSet a -> Bool Source #

lookupUniqSet :: Uniquable a => UniqSet b -> a -> Maybe b Source #

lookupUniqSet_Directly :: UniqSet a -> Unique -> Maybe a Source #

partitionUniqSet :: (a -> Bool) -> UniqSet a -> (UniqSet a, UniqSet a) Source #

mapUniqSet :: Uniquable b => (a -> b) -> UniqSet a -> UniqSet b Source #

unsafeUFMToUniqSet :: UniqFM a -> UniqSet a Source #

`unsafeUFMToUniqSet` converts a ``UniqFM` a` into a ``UniqSet` a` assuming, without checking, that it maps each `Unique` to a value that has that `Unique`. See Note [UniqSet invariant].

nonDetEltsUniqSet :: UniqSet elt -> [elt] Source #

nonDetKeysUniqSet :: UniqSet elt -> [Unique] Source #

nonDetFoldUniqSet :: (elt -> a -> a) -> a -> UniqSet elt -> a Source #

nonDetFoldUniqSet_Directly :: (Unique -> elt -> a -> a) -> a -> UniqSet elt -> a Source #