Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
GHC.Types.Unique
Synopsis
- data Unique
- class Uniquable a where
- uNIQUE_BITS :: Int
- hasKey :: Uniquable a => a -> Unique -> Bool
- pprUniqueAlways :: IsLine doc => Unique -> doc
- mkUniqueGrimily :: Int -> Unique
- getKey :: Unique -> Int
- mkUnique :: Char -> Int -> Unique
- unpkUnique :: Unique -> (Char, Int)
- eqUnique :: Unique -> Unique -> Bool
- ltUnique :: Unique -> Unique -> Bool
- incrUnique :: Unique -> Unique
- stepUnique :: Unique -> Int -> Unique
- newTagUnique :: Unique -> Char -> Unique
- nonDetCmpUnique :: Unique -> Unique -> Ordering
- isValidKnownKeyUnique :: Unique -> Bool
- mkLocalUnique :: Int -> Unique
- minLocalUnique :: Unique
- maxLocalUnique :: Unique
Main data types
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
Show Unique # | |
Uniquable Unique # | |
Defined in GHC.Types.Unique | |
Outputable Unique # | |
Defined in GHC.Types.Unique | |
Eq Unique # | |
Class of things that we can obtain a Unique
from
Instances
uNIQUE_BITS :: Int #
Constructors, destructors and operations on Unique
s
pprUniqueAlways :: IsLine doc => Unique -> doc #
mkUniqueGrimily :: Int -> Unique #
unpkUnique :: Unique -> (Char, Int) #
incrUnique :: Unique -> Unique #
stepUnique :: Unique -> Int -> Unique #
newTagUnique :: Unique -> Char -> Unique #
nonDetCmpUnique :: Unique -> Unique -> Ordering #
isValidKnownKeyUnique :: Unique -> Bool #
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 GHC.Iface.Binary for details.
Local uniques
These are exposed exclusively for use by uniqAway
, which
has rather peculiar needs. See Note [Local uniques].
mkLocalUnique :: Int -> Unique #