Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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.
class Uniquable a where Source #
Class of things that we can obtain a Unique
from
Instances
uNIQUE_BITS :: Int Source #
Constructors, destructors and operations on Unique
s
pprUniqueAlways :: IsLine doc => Unique -> doc Source #
mkUniqueGrimily :: Int -> Unique Source #
incrUnique :: Unique -> Unique Source #
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 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 Source #