Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- 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
- extendNameSet :: NameSet -> Name -> NameSet
- extendNameSetList :: NameSet -> [Name] -> NameSet
- delFromNameSet :: NameSet -> Name -> NameSet
- delListFromNameSet :: NameSet -> [Name] -> NameSet
- isEmptyNameSet :: NameSet -> Bool
- filterNameSet :: (Name -> Bool) -> NameSet -> NameSet
- intersectsNameSet :: NameSet -> NameSet -> Bool
- disjointNameSet :: NameSet -> NameSet -> Bool
- intersectNameSet :: NameSet -> NameSet -> NameSet
- nameSetAny :: (Name -> Bool) -> NameSet -> Bool
- nameSetAll :: (Name -> Bool) -> NameSet -> Bool
- 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
- intersectFVs :: FreeVars -> FreeVars -> FreeVars
- type Defs = NameSet
- type Uses = NameSet
- type DefUse = (Maybe Defs, Uses)
- type DefUses = OrdList 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
- newtype NonCaffySet = NonCaffySet {}
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.
Instances
Monoid NonCaffySet Source # | |
Defined in GHC.Types.Name.Set mempty :: NonCaffySet Source # mappend :: NonCaffySet -> NonCaffySet -> NonCaffySet Source # mconcat :: [NonCaffySet] -> NonCaffySet Source # | |
Semigroup NonCaffySet Source # | |
Defined in GHC.Types.Name.Set (<>) :: NonCaffySet -> NonCaffySet -> NonCaffySet Source # sconcat :: NonEmpty NonCaffySet -> NonCaffySet Source # stimes :: Integral b => b -> NonCaffySet -> NonCaffySet Source # |