GHC.Types.Name.Set
Names set type
Manipulating these sets
unitNameSet :: Name -> NameSet Source #
unionNameSets :: [NameSet] -> NameSet Source #
isEmptyNameSet :: NameSet -> Bool Source #
disjointNameSet :: NameSet -> NameSet -> Bool Source #
True if there is a non-empty intersection.
s1
doesn't compute intersectsNameSet
s2s2
if s1
is empty
nameSetElemsStable :: NameSet -> [Name] Source #
Get the elements of a NameSet with some stable ordering. This only works for Names that originate in the source code or have been tidied. See Note [Deterministic UniqFM] to learn about nondeterminism
Free variables
Manipulating sets of free variables
isEmptyFVs :: NameSet -> Bool Source #
Defs and uses
type DefUse = (Maybe Defs, Uses) Source #
(Just ds, us) =>
The use of any member of the ds
implies that all the us
are used too.
Also, us
may mention ds
.
Nothing =>
Nothing is defined in this group, but
nevertheless all the uses are essential.
Used for instance declarations, for example
Manipulating defs and uses
Non-CAFfy names
newtype NonCaffySet Source #
Id
s which have no CAF references. This is a result of analysis of C--.
It is always safe to use an empty NonCaffySet
. TODO Refer to Note.
Constructors
NonCaffySet | |
Fields |
Instances
Monoid NonCaffySet Source # | |
Defined in GHC.Types.Name.Set Methods mempty :: NonCaffySet Source # mappend :: NonCaffySet -> NonCaffySet -> NonCaffySet Source # mconcat :: [NonCaffySet] -> NonCaffySet Source # | |
Semigroup NonCaffySet Source # | |
Defined in GHC.Types.Name.Set Methods (<>) :: NonCaffySet -> NonCaffySet -> NonCaffySet Source # sconcat :: NonEmpty NonCaffySet -> NonCaffySet Source # stimes :: Integral b => b -> NonCaffySet -> NonCaffySet Source # |