ghc-8.4.0.20171214: 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.

Instances
Eq Unique # 
Instance details

Methods

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

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

Show Unique # 
Instance details
Outputable Unique # 
Instance details
Uniquable Unique # 
Instance details

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 # 
Instance details

Methods

getUnique :: Int -> Unique Source #

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

so we can put regs in UniqSets

Instance details

Methods

getUnique :: Reg -> Unique Source #

Uniquable Reg # 
Instance details

Methods

getUnique :: Reg -> Unique Source #

Uniquable RealReg # 
Instance details
Uniquable VirtualReg # 
Instance details
Uniquable Label # 
Instance details
Uniquable PackageName # 
Instance details
Uniquable SourcePackageId # 
Instance details
Uniquable Var # 
Instance details

Methods

getUnique :: Var -> Unique Source #

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

Methods

getUnique :: AnnTarget name -> Unique Source #

Uniquable (CoAxiom br) # 
Instance details

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