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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

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 names

12 declarations

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