ghc-9.0.1: The GHC API
Safe HaskellNone
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
Eq Unique # 
Instance details

Defined in GHC.Types.Unique

Methods

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

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

Show Unique # 
Instance details

Defined in GHC.Types.Unique

Outputable Unique # 
Instance details

Defined in GHC.Types.Unique

Uniquable Unique # 
Instance details

Defined in GHC.Types.Unique

class Uniquable a where Source #

Class of things that we can obtain a Unique from

Methods

getUnique :: a -> Unique Source #

Instances

Instances details
Uniquable Int # 
Instance details

Defined in GHC.Types.Unique

Methods

getUnique :: Int -> Unique Source #

Uniquable Name # 
Instance details

Defined in GHC.Types.Name

Uniquable OccName # 
Instance details

Defined in GHC.Types.Name.Occurrence

Uniquable Var # 
Instance details

Defined in GHC.Types.Var

Methods

getUnique :: Var -> Unique Source #

Uniquable ModuleName # 
Instance details

Defined in GHC.Unit.Module.Name

Uniquable Unit # 
Instance details

Defined in GHC.Unit.Types

Uniquable Module # 
Instance details

Defined in GHC.Unit.Types

Uniquable UnitId # 
Instance details

Defined in GHC.Unit.Types

Uniquable FastString # 
Instance details

Defined in GHC.Types.Unique

Uniquable Unique # 
Instance details

Defined in GHC.Types.Unique

Uniquable PackageName # 
Instance details

Defined in GHC.Unit.Info

Uniquable PackageId # 
Instance details

Defined in GHC.Unit.Info

Uniquable TyCon # 
Instance details

Defined in GHC.Core.TyCon

Uniquable Reg #

so we can put regs in UniqSets

Instance details

Defined in GHC.CmmToAsm.Reg.Graph.Base

Methods

getUnique :: Reg -> Unique Source #

Uniquable RegClass # 
Instance details

Defined in GHC.Platform.Reg.Class

Uniquable Reg # 
Instance details

Defined in GHC.Platform.Reg

Methods

getUnique :: Reg -> Unique Source #

Uniquable RealReg # 
Instance details

Defined in GHC.Platform.Reg

Uniquable VirtualReg # 
Instance details

Defined in GHC.Platform.Reg

Uniquable PatSyn # 
Instance details

Defined in GHC.Core.PatSyn

Uniquable DataCon # 
Instance details

Defined in GHC.Core.DataCon

Uniquable ConLike # 
Instance details

Defined in GHC.Core.ConLike

Uniquable CoAxiomRule # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Uniquable Class # 
Instance details

Defined in GHC.Core.Class

Uniquable Label # 
Instance details

Defined in GHC.Cmm.Dataflow.Label

Uniquable EvBindsVar # 
Instance details

Defined in GHC.Tc.Types.Evidence

Uniquable LocalReg # 
Instance details

Defined in GHC.Cmm.Expr

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

Defined in GHC.Unit.Types

Methods

getUnique :: Indefinite unit -> Unique Source #

Uniquable (CoAxiom br) # 
Instance details

Defined in GHC.Core.Coercion.Axiom

Methods

getUnique :: CoAxiom br -> 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].