ghc-8.2.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

Unique

Contents

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.

class Uniquable a where Source #

Class of things that we can obtain a Unique from

Minimal complete definition

getUnique

Methods

getUnique :: a -> Unique Source #

Instances

Uniquable Int Source # 

Methods

getUnique :: Int -> Unique Source #

Uniquable Name Source # 
Uniquable OccName Source # 
Uniquable TyCon Source # 
Uniquable FastString Source # 
Uniquable ComponentId Source # 
Uniquable InstalledUnitId Source # 
Uniquable UnitId Source # 
Uniquable ModuleName Source # 
Uniquable Module Source # 
Uniquable Unique Source # 
Uniquable RegClass Source # 
Uniquable Reg Source #

so we can put regs in UniqSets

Methods

getUnique :: Reg -> Unique Source #

Uniquable Reg Source # 

Methods

getUnique :: Reg -> Unique Source #

Uniquable RealReg Source # 
Uniquable VirtualReg Source # 
Uniquable PackageName Source # 
Uniquable SourcePackageId Source # 
Uniquable Var Source # 

Methods

getUnique :: Var -> Unique Source #

Uniquable PatSyn Source # 
Uniquable DataCon Source # 
Uniquable ConLike Source # 
Uniquable CoAxiomRule Source # 
Uniquable Class Source # 
Uniquable LocalReg Source # 
Uniquable EvBindsVar Source # 
Uniquable name => Uniquable (AnnTarget name) Source # 

Methods

getUnique :: AnnTarget name -> Unique Source #

Uniquable (CoAxiom br) Source # 

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 BinIface for details.

Making built-in uniques

Deriving uniques

From TyCon name uniques

From DataCon name uniques