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.Unique

  • 2 types
  • 1 class
  • 26 values

Main data types

6 declarations
newtypenewtype Unique
#

Unique identifier.

The type of unique identifiers that are used in many places in GHC for fast ordering and equality tests. You should generate these with the functions from the UniqSupply module

Instances4Eq, Show, Outputable, Uniquable
  • Eq UniqueDefined in ghc-10.0.0.20260917 · GHC.Types.Unique
  • Show UniqueDefined in ghc-10.0.0.20260917 · GHC.Types.Unique
  • Outputable UniqueDefined in ghc-10.0.0.20260917 · GHC.Types.Unique
  • Uniquable UniqueDefined in ghc-10.0.0.20260917 · GHC.Types.Unique
classclass Uniquable a where
#

Class of things that we can obtain a Unique from

Methods

Instances38Uniquable, …
datadata UniqueTag
#
Instances4Bounded, Enum, Eq, Show

Constructors, destructors and operations on Uniques

valuemkTag :: Char -> Word64
#

Put the character in the highest bits of the Word64. This may truncate the character to 8. This function is used in mkSplitUniqSupply so that it can precompute and share the tag part of the uniques it generates.

Local uniques

These are exposed exclusively for use by uniqAway, which has rather peculiar needs. See Note [Local uniques].