ghc-8.4.1: 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 Source # 
Instance details

Methods

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

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

Show Unique Source # 
Instance details
Outputable Unique Source # 
Instance details
Uniquable Unique Source # 
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 Source # 
Instance details

Methods

getUnique :: Int -> Unique Source #

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

so we can put regs in UniqSets

Instance details

Methods

getUnique :: Reg -> Unique Source #

Uniquable Reg Source # 
Instance details

Methods

getUnique :: Reg -> Unique Source #

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

Methods

getUnique :: Var -> Unique Source #

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

Methods

getUnique :: AnnTarget name -> Unique Source #

Uniquable (CoAxiom br) Source # 
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