ghc-9.0.2: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Types.Unique

Synopsis

Main data types

data Unique Source #

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

These are sometimes also referred to as "keys" in comments in GHC.

Instances

Instances details
Show Unique Source # 
Instance details

Defined in GHC.Types.Unique

Uniquable Unique Source # 
Instance details

Defined in GHC.Types.Unique

Outputable Unique Source # 
Instance details

Defined in GHC.Types.Unique

Eq Unique Source # 
Instance details

Defined in GHC.Types.Unique

Methods

(==) :: Unique -> Unique -> Bool #

(/=) :: Unique -> Unique -> Bool #

class Uniquable a where Source #

Class of things that we can obtain a Unique from

Methods

getUnique :: a -> Unique Source #

Instances

Instances details
Uniquable Label Source # 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Uniquable LocalReg Source # 
Instance details

Defined in GHC.Cmm.Expr

Uniquable Reg Source #

so we can put regs in UniqSets

Instance details

Defined in GHC.CmmToAsm.Reg.Graph.Base

Methods

getUnique :: Reg -> Unique Source #

Uniquable Class Source # 
Instance details

Defined in GHC.Core.Class

Uniquable CoAxiomRule Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Uniquable ConLike Source # 
Instance details

Defined in GHC.Core.ConLike

Uniquable DataCon Source # 
Instance details

Defined in GHC.Core.DataCon

Uniquable PatSyn Source # 
Instance details

Defined in GHC.Core.PatSyn

Uniquable TyCon Source # 
Instance details

Defined in GHC.Core.TyCon

Uniquable FastString Source # 
Instance details

Defined in GHC.Types.Unique

Uniquable RealReg Source # 
Instance details

Defined in GHC.Platform.Reg

Uniquable Reg Source # 
Instance details

Defined in GHC.Platform.Reg

Methods

getUnique :: Reg -> Unique Source #

Uniquable VirtualReg Source # 
Instance details

Defined in GHC.Platform.Reg

Uniquable RegClass Source # 
Instance details

Defined in GHC.Platform.Reg.Class

Uniquable EvBindsVar Source # 
Instance details

Defined in GHC.Tc.Types.Evidence

Uniquable Name Source # 
Instance details

Defined in GHC.Types.Name

Uniquable OccName Source # 
Instance details

Defined in GHC.Types.Name.Occurrence

Uniquable Unique Source # 
Instance details

Defined in GHC.Types.Unique

Uniquable Var Source # 
Instance details

Defined in GHC.Types.Var

Methods

getUnique :: Var -> Unique Source #

Uniquable PackageId Source # 
Instance details

Defined in GHC.Unit.Info

Uniquable PackageName Source # 
Instance details

Defined in GHC.Unit.Info

Uniquable ModuleName Source # 
Instance details

Defined in GHC.Unit.Module.Name

Uniquable Module Source # 
Instance details

Defined in GHC.Unit.Types

Uniquable Unit Source # 
Instance details

Defined in GHC.Unit.Types

Uniquable UnitId Source # 
Instance details

Defined in GHC.Unit.Types

Uniquable Int Source # 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Int -> Unique Source #

Uniquable (CoAxiom br) Source # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

getUnique :: CoAxiom br -> Unique Source #

Uniquable unit => Uniquable (Indefinite unit) Source # 
Instance details

Defined in GHC.Unit.Types

Methods

getUnique :: Indefinite unit -> Unique Source #

Constructors, destructors and operations on Uniques

isValidKnownKeyUnique :: Unique -> Bool Source #

The interface file symbol-table encoding assumes that known-key uniques fit in 30-bits; verify this.

See Note [Symbol table representation of names] in GHC.Iface.Binary for details.

Making built-in uniques

Deriving uniques

From TyCon name uniques

From DataCon name uniques

Local uniques

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