KnownUniques

ghc-8.4.4: The GHC API

Safe Haskell | None
Language | Haskell2010

KnownUniques

Contents

- Looking up known-key names
- Getting the `Unique`s of `Name`s
  - Anonymous sums
  - Tuples
    - Vanilla
    - Constraint

Description

This is where we define a mapping from Uniques to their associated known-key Names for things associated with tuples and sums. We use this mapping while deserializing known-key Names in interface file symbol tables, which are encoded as their Unique. See Note [Symbol table representation of names] for details.

Synopsis

- knownUniqueName :: Unique -> Maybe Name
- mkSumTyConUnique :: Arity -> Unique
- mkSumDataConUnique :: ConTagZ -> Arity -> Unique
- mkTupleTyConUnique :: Boxity -> Arity -> Unique
- mkTupleDataConUnique :: Boxity -> Arity -> Unique
- mkCTupleTyConUnique :: Arity -> Unique
- mkCTupleDataConUnique :: Arity -> Unique

# Looking up known-key names

knownUniqueName :: Unique -> Maybe Name #

Get the `Name` associated with a known-key `Unique`.

# Getting the `Unique`s of `Name`s

## Anonymous sums

mkSumTyConUnique :: Arity -> Unique #

mkSumDataConUnique :: ConTagZ -> Arity -> Unique #

## Tuples

### Vanilla

mkTupleTyConUnique :: Boxity -> Arity -> Unique #

mkTupleDataConUnique :: Boxity -> Arity -> Unique #

### Constraint

mkCTupleTyConUnique :: Arity -> Unique #

mkCTupleDataConUnique :: Arity -> Unique #