Unique

ghc-8.0.0.20160421: The GHC API

Safe Haskell | None
Language | Haskell2010

Unique

Contents

- Main data types
  - Constructors, destructors and operations on `Unique`s
  - Making built-in uniques

Synopsis

- data Unique
- class Uniquable a where
- hasKey :: Uniquable a => a -> Unique -> Bool
- cmpByUnique :: Uniquable a => a -> a -> Ordering
- pprUnique :: Unique -> SDoc
- mkUniqueGrimily :: Int -> Unique
- getKey :: Unique -> Int
- mkUnique :: Char -> Int -> Unique
- unpkUnique :: Unique -> (Char, Int)
- incrUnique :: Unique -> Unique
- deriveUnique :: Unique -> Int -> Unique
- newTagUnique :: Unique -> Char -> Unique
- initTyVarUnique :: Unique
- mkAlphaTyVarUnique :: Int -> Unique
- mkPrimOpIdUnique :: Int -> Unique
- mkTupleTyConUnique :: Boxity -> Arity -> Unique
- mkTupleDataConUnique :: Boxity -> Arity -> Unique
- mkCTupleTyConUnique :: Arity -> Unique
- mkPreludeMiscIdUnique :: Int -> Unique
- mkPreludeDataConUnique :: Arity -> Unique
- mkPreludeTyConUnique :: Int -> Unique
- mkPreludeClassUnique :: Int -> Unique
- mkPArrDataConUnique :: Int -> Unique
- mkCoVarUnique :: Int -> Unique
- mkVarOccUnique :: FastString -> Unique
- mkDataOccUnique :: FastString -> Unique
- mkTvOccUnique :: FastString -> Unique
- mkTcOccUnique :: FastString -> Unique
- mkRegSingleUnique :: Int -> Unique
- mkRegPairUnique :: Int -> Unique
- mkRegClassUnique :: Int -> Unique
- mkRegSubUnique :: Int -> Unique
- mkCostCentreUnique :: Int -> Unique
- tyConRepNameUnique :: Unique -> Unique
- dataConWorkerUnique :: Unique -> Unique
- dataConRepNameUnique :: Unique -> Unique
- mkBuiltinUnique :: Int -> Unique
- mkPseudoUniqueD :: Int -> Unique
- mkPseudoUniqueE :: Int -> Unique
- mkPseudoUniqueH :: Int -> Unique

# Main data types

data Unique Source #

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

Instances

Eq Unique # |
Methods (==) :: Unique -> Unique -> Bool # (/=) :: Unique -> Unique -> Bool #
Ord Unique # |
Methods compare :: Unique -> Unique -> Ordering # (<) :: Unique -> Unique -> Bool # (<=) :: Unique -> Unique -> Bool # (>) :: Unique -> Unique -> Bool # (>=) :: Unique -> Unique -> Bool # max :: Unique -> Unique -> Unique # min :: Unique -> Unique -> Unique #
Show Unique # |
Methods showsPrec :: Int -> Unique -> ShowS Source # show :: Unique -> String Source # showList :: [Unique] -> ShowS Source #
Outputable Unique # |
Methods ppr :: Unique -> SDoc Source # pprPrec :: Rational -> Unique -> SDoc Source #
Uniquable Unique # |
Methods getUnique :: Unique -> Unique Source #

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 # |
Methods getUnique :: Int -> Unique Source #
Uniquable OccName # |
Methods getUnique :: OccName -> Unique Source #
Uniquable UnitId # |
Methods getUnique :: UnitId -> Unique Source #
Uniquable ModuleName # |
Methods getUnique :: ModuleName -> Unique Source #
Uniquable Module # |
Methods getUnique :: Module -> Unique Source #
Uniquable Name # |
Methods getUnique :: Name -> Unique Source #
Uniquable FastString # |
Methods getUnique :: FastString -> Unique Source #
Uniquable Unique # |
Methods getUnique :: Unique -> Unique Source #
Uniquable RegClass # |
Methods getUnique :: RegClass -> Unique Source #
Uniquable Reg # |
Methods getUnique :: Reg -> Unique Source #
Uniquable RealReg # |
Methods getUnique :: RealReg -> Unique Source #
Uniquable VirtualReg # |
Methods getUnique :: VirtualReg -> Unique Source #
Uniquable Reg # | so we can put regs in UniqSets
Methods getUnique :: Reg -> Unique Source #
Uniquable PackageName # |
Methods getUnique :: PackageName -> Unique Source #
Uniquable SourcePackageId # |
Methods getUnique :: SourcePackageId -> Unique Source #
Uniquable ComponentId # |
Methods getUnique :: ComponentId -> Unique Source #
Uniquable TyCon # |
Methods getUnique :: TyCon -> Unique Source #
Uniquable Var # |
Methods getUnique :: Var -> Unique Source #
Uniquable DataCon # |
Methods getUnique :: DataCon -> Unique Source #
Uniquable PatSyn # |
Methods getUnique :: PatSyn -> Unique Source #
Uniquable ConLike # |
Methods getUnique :: ConLike -> Unique Source #
Uniquable CoAxiomRule # |
Methods getUnique :: CoAxiomRule -> Unique Source #
Uniquable Class # |
Methods getUnique :: Class -> Unique Source #
Uniquable LocalReg # |
Methods getUnique :: LocalReg -> Unique Source #
Uniquable EvBindsVar # |
Methods getUnique :: EvBindsVar -> Unique Source #
Uniquable name => Uniquable (AnnTarget name) # |
Methods getUnique :: AnnTarget name -> Unique Source #
Uniquable (CoAxiom br) # |
Methods getUnique :: CoAxiom br -> Unique Source #

## Constructors, destructors and operations on `Unique`s

hasKey :: Uniquable a => a -> Unique -> Bool Source #

cmpByUnique :: Uniquable a => a -> a -> Ordering Source #

pprUnique :: Unique -> SDoc Source #

mkUniqueGrimily :: Int -> Unique Source #

getKey :: Unique -> Int Source #

mkUnique :: Char -> Int -> Unique Source #

unpkUnique :: Unique -> (Char, Int) Source #

incrUnique :: Unique -> Unique Source #

deriveUnique :: Unique -> Int -> Unique Source #

newTagUnique :: Unique -> Char -> Unique Source #

initTyVarUnique :: Unique Source #

## Making built-in uniques

mkAlphaTyVarUnique :: Int -> Unique Source #

mkPrimOpIdUnique :: Int -> Unique Source #

mkTupleTyConUnique :: Boxity -> Arity -> Unique Source #

mkTupleDataConUnique :: Boxity -> Arity -> Unique Source #

mkCTupleTyConUnique :: Arity -> Unique Source #

mkPreludeMiscIdUnique :: Int -> Unique Source #

mkPreludeDataConUnique :: Arity -> Unique Source #

mkPreludeTyConUnique :: Int -> Unique Source #

mkPreludeClassUnique :: Int -> Unique Source #

mkPArrDataConUnique :: Int -> Unique Source #

mkCoVarUnique :: Int -> Unique Source #

mkVarOccUnique :: FastString -> Unique Source #

mkDataOccUnique :: FastString -> Unique Source #

mkTvOccUnique :: FastString -> Unique Source #

mkTcOccUnique :: FastString -> Unique Source #

mkRegSingleUnique :: Int -> Unique Source #

mkRegPairUnique :: Int -> Unique Source #

mkRegClassUnique :: Int -> Unique Source #

mkRegSubUnique :: Int -> Unique Source #

mkCostCentreUnique :: Int -> Unique Source #

tyConRepNameUnique :: Unique -> Unique Source #

dataConWorkerUnique :: Unique -> Unique Source #

dataConRepNameUnique :: Unique -> Unique Source #

mkBuiltinUnique :: Int -> Unique Source #

mkPseudoUniqueD :: Int -> Unique Source #

mkPseudoUniqueE :: Int -> Unique Source #

mkPseudoUniqueH :: Int -> Unique Source #