Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type NameSet = UniqSet Name
- emptyNameSet :: NameSet
- unitNameSet :: Name -> NameSet
- mkNameSet :: [Name] -> NameSet
- unionNameSet :: NameSet -> NameSet -> NameSet
- unionNameSets :: [NameSet] -> NameSet
- minusNameSet :: NameSet -> NameSet -> NameSet
- elemNameSet :: Name -> NameSet -> Bool
- nameSetElems :: NameSet -> [Name]
- extendNameSet :: NameSet -> Name -> NameSet
- extendNameSetList :: NameSet -> [Name] -> NameSet
- delFromNameSet :: NameSet -> Name -> NameSet
- delListFromNameSet :: NameSet -> [Name] -> NameSet
- isEmptyNameSet :: NameSet -> Bool
- foldNameSet :: (Name -> b -> b) -> b -> NameSet -> b
- filterNameSet :: (Name -> Bool) -> NameSet -> NameSet
- intersectsNameSet :: NameSet -> NameSet -> Bool
- intersectNameSet :: NameSet -> NameSet -> NameSet
- nameSetElemsStable :: NameSet -> [Name]
- type FreeVars = NameSet
- isEmptyFVs :: NameSet -> Bool
- emptyFVs :: FreeVars
- plusFVs :: [FreeVars] -> FreeVars
- plusFV :: FreeVars -> FreeVars -> FreeVars
- mkFVs :: [Name] -> FreeVars
- addOneFV :: FreeVars -> Name -> FreeVars
- unitFV :: Name -> FreeVars
- delFV :: Name -> FreeVars -> FreeVars
- delFVs :: [Name] -> FreeVars -> FreeVars
- type Defs = NameSet
- type Uses = NameSet
- type DefUse = (Maybe Defs, Uses)
- type DefUses = [DefUse]
- emptyDUs :: DefUses
- usesOnly :: Uses -> DefUses
- mkDUs :: [(Defs, Uses)] -> DefUses
- plusDU :: DefUses -> DefUses -> DefUses
- findUses :: DefUses -> Uses -> Uses
- duDefs :: DefUses -> Defs
- duUses :: DefUses -> Uses
- allUses :: DefUses -> Uses
Names set type
Manipulating these sets
unitNameSet :: Name -> NameSet Source #
unionNameSets :: [NameSet] -> NameSet Source #
nameSetElems :: NameSet -> [Name] Source #
isEmptyNameSet :: NameSet -> Bool Source #
foldNameSet :: (Name -> b -> b) -> b -> NameSet -> b Source #
intersectsNameSet :: 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