ghc-6.12.2: The GHC APISource codeContentsIndex
NameSet
Contents
Names set type
Manipulating these sets
Free variables
Manipulating sets of free variables
Defs and uses
Manipulating defs and uses
Synopsis
type NameSet = UniqSet Name
emptyNameSet :: NameSet
unitNameSet :: Name -> NameSet
mkNameSet :: [Name] -> NameSet
unionNameSets :: NameSet -> NameSet -> NameSet
unionManyNameSets :: [NameSet] -> NameSet
minusNameSet :: NameSet -> NameSet -> NameSet
elemNameSet :: Name -> NameSet -> Bool
nameSetToList :: NameSet -> [Name]
addOneToNameSet :: NameSet -> Name -> NameSet
addListToNameSet :: 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
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
type NameSet = UniqSet NameSource
Manipulating these sets
emptyNameSet :: NameSetSource
unitNameSet :: Name -> NameSetSource
mkNameSet :: [Name] -> NameSetSource
unionNameSets :: NameSet -> NameSet -> NameSetSource
unionManyNameSets :: [NameSet] -> NameSetSource
minusNameSet :: NameSet -> NameSet -> NameSetSource
elemNameSet :: Name -> NameSet -> BoolSource
nameSetToList :: NameSet -> [Name]Source
addOneToNameSet :: NameSet -> Name -> NameSetSource
addListToNameSet :: NameSet -> [Name] -> NameSetSource
delFromNameSet :: NameSet -> Name -> NameSetSource
delListFromNameSet :: NameSet -> [Name] -> NameSetSource
isEmptyNameSet :: NameSet -> BoolSource
foldNameSet :: (Name -> b -> b) -> b -> NameSet -> bSource
filterNameSet :: (Name -> Bool) -> NameSet -> NameSetSource
intersectsNameSet :: NameSet -> NameSet -> BoolSource
True if there is a non-empty intersection. s1 intersectsNameSet s2 doesn't compute s2 if s1 is empty
intersectNameSet :: NameSet -> NameSet -> NameSetSource
Free variables
type FreeVars = NameSetSource
Manipulating sets of free variables
isEmptyFVs :: NameSet -> BoolSource
emptyFVs :: FreeVarsSource
plusFVs :: [FreeVars] -> FreeVarsSource
plusFV :: FreeVars -> FreeVars -> FreeVarsSource
mkFVs :: [Name] -> FreeVarsSource
addOneFV :: FreeVars -> Name -> FreeVarsSource
unitFV :: Name -> FreeVarsSource
delFV :: Name -> FreeVars -> FreeVarsSource
delFVs :: [Name] -> FreeVars -> FreeVarsSource
Defs and uses
type Defs = NameSetSource
A set of names that are defined somewhere
type Uses = NameSetSource
A set of names that are used somewhere
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

type DefUses = [DefUse]Source
A number of DefUses in dependency order: earlier Defs scope over later Uses
Manipulating defs and uses
emptyDUs :: DefUsesSource
usesOnly :: Uses -> DefUsesSource
mkDUs :: [(Defs, Uses)] -> DefUsesSource
plusDU :: DefUses -> DefUses -> DefUsesSource
findUses :: DefUses -> Uses -> UsesSource
Given some DefUses and some Uses, find all the uses, transitively. The result is a superset of the input Uses; and includes things defined in the input DefUses (but only if they are used)
duDefs :: DefUses -> DefsSource
duUses :: DefUses -> UsesSource
Just like allUses, but Defs are not eliminated from the Uses returned
allUses :: DefUses -> UsesSource
Collect all Uses, regardless of whether the group is itself used, but remove Defs on the way
Produced by Haddock version 2.6.1