HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulevault-0.3.1.5Haskell2010

Data.Unique.Really

An abstract interface to a unique symbol generator.

  • 1 type
  • 2 values
  • Packagevault-0.3.1.5
  • Exports3
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceReally.hs
newtypenewtype Unique
#

An abstract unique value. Values of type Unique may be compared for equality and hashed into Int.

Note: Unlike the symbols from Data.Unique, the symbols from this module do not become equal after reloads in the GHC interpreter!

Instances2Eq, Hashable
  • Eq UniqueDefined in vault-0.3.1.5 · Data.Unique.Really
  • Hashable UniqueDefined in vault-0.3.1.5 · Data.Unique.Really
valuenewUnique :: IO Unique
#

Creates a new object of type Unique. The value returned will not compare equal to any other value of type Unique returned by previous calls to newUnique. There is no limit on the number of times you may call this function.

valuehashUnique :: Unique -> Int
#

Hashes a Unique into an Int. Two Uniques may hash to the same value, although in practice this is unlikely. The Int returned makes a good hash key.