HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.Types.Name.Set

  • 7 types
  • 38 values

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