KnownUniques

ghc-8.2.1.20171030: 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 Source #

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

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

## Anonymous sums

mkSumTyConUnique :: Arity -> Unique Source #

mkSumDataConUnique :: ConTagZ -> Arity -> Unique Source #

## Tuples

### Vanilla

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

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

### Constraint

mkCTupleTyConUnique :: Arity -> Unique Source #

mkCTupleDataConUnique :: Arity -> Unique Source #