ghc-9.12: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Types.Unique.Set

Synopsis

Unique set type

data UniqSet a Source #

Set of Uniquable values

Instances

Instances details
NFData a => NFData (UniqSet a) Source # 
Instance details

Defined in GHC.Types.Unique.Set

Methods

rnf :: UniqSet a -> () Source #

Outputable a => Outputable (UniqSet a) Source # 
Instance details

Defined in GHC.Types.Unique.Set

Methods

ppr :: UniqSet a -> SDoc Source #

Monoid (UniqSet a) Source # 
Instance details

Defined in GHC.Types.Unique.Set

Methods

mempty :: UniqSet a #

mappend :: UniqSet a -> UniqSet a -> UniqSet a #

mconcat :: [UniqSet a] -> UniqSet a #

Semigroup (UniqSet a) Source # 
Instance details

Defined in GHC.Types.Unique.Set

Methods

(<>) :: UniqSet a -> UniqSet a -> UniqSet a #

sconcat :: NonEmpty (UniqSet a) -> UniqSet a #

stimes :: Integral b => b -> UniqSet a -> UniqSet a #

Data a => Data (UniqSet a) Source # 
Instance details

Defined in GHC.Types.Unique.Set

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UniqSet a -> c (UniqSet a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (UniqSet a) #

toConstr :: UniqSet a -> Constr #

dataTypeOf :: UniqSet a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (UniqSet a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (UniqSet a)) #

gmapT :: (forall b. Data b => b -> b) -> UniqSet a -> UniqSet a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UniqSet a -> r #

gmapQ :: (forall d. Data d => d -> u) -> UniqSet a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UniqSet a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UniqSet a -> m (UniqSet a) #

Eq (UniqSet a) Source # 
Instance details

Defined in GHC.Types.Unique.Set

Methods

(==) :: UniqSet a -> UniqSet a -> Bool #

(/=) :: UniqSet a -> UniqSet a -> Bool #

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

Manipulating these sets

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

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

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

lookupUniqSet :: Uniquable key => UniqSet key -> key -> Maybe key Source #

What's the point you might ask? We might have changed an object without it's key changing. In which case this lookup makes sense.

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

unsafeUFMToUniqSet :: UniqFM a 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].

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

mapMaybeUniqSet_sameUnique :: (a -> Maybe b) -> UniqSet a -> UniqSet b Source #

Like mapMaybe, but you must ensure the passed in function does not change the Unique.

newtype UniqueSet Source #

Set of Unique values

Similar to 'UniqSet Unique' but with a more compact representation.

Constructors

US 

foldlUniqueSet :: (a -> Unique -> a) -> a -> UniqueSet -> a Source #

foldrUniqueSet :: (Unique -> b -> b) -> b -> UniqueSet -> b Source #