HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.Types.Name.Set

  • 7 types
  • 38 values
  • Packageghc-9.10.3
  • Exports45
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceSet.hs

Names set type

1 declaration

Manipulating these sets

valuenameSetElemsStable :: NameSet -> [Name]
#

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

1 declaration

Manipulating sets of free variables

Defs and uses

4 declarations
typetype Defs = NameSet
#

A set of names that are defined somewhere

typetype Uses = NameSet
#

A set of names that are used somewhere

typetype DefUse = (Maybe Defs, Uses)
#

(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

typetype DefUses = OrdList DefUse
#

A number of DefUses in dependency order: earlier Defs scope over later Uses In a single (def, use) pair, the defs also scope over the uses

Manipulating defs and uses

valuefindUses :: DefUses -> Uses -> Uses
#

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)

Non-CAFfy names

1 declaration