Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Unique
- class Uniquable a where
- uNIQUE_BITS :: Int
- hasKey :: Uniquable a => a -> Unique -> Bool
- pprUniqueAlways :: IsLine doc => Unique -> doc
- mkTag :: Char -> Word64
- mkUniqueGrimily :: Word64 -> Unique
- mkUniqueIntGrimily :: Int -> Unique
- getKey :: Unique -> Word64
- mkUnique :: Char -> Word64 -> Unique
- unpkUnique :: Unique -> (Char, Word64)
- mkUniqueInt :: Char -> Int -> Unique
- eqUnique :: Unique -> Unique -> Bool
- ltUnique :: Unique -> Unique -> Bool
- incrUnique :: Unique -> Unique
- stepUnique :: Unique -> Word64 -> Unique
- newTagUnique :: Unique -> Char -> Unique
- nonDetCmpUnique :: Unique -> Unique -> Ordering
- isValidKnownKeyUnique :: Unique -> Bool
- mkLocalUnique :: Word64 -> 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 #
mkTag :: Char -> Word64 Source #
Put the character in the highest bits of the Word64.
This may truncate the character to 8.
This function is used in
so that it can
precompute and share the tag part of the uniques it generates.mkSplitUniqSupply
mkUniqueGrimily :: Word64 -> Unique Source #
mkUniqueIntGrimily :: 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 :: Word64 -> Unique Source #