HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerebase-1.21.2Haskell2010

Rebase.Data.Unique

  • 1 type
  • 2 values
  • Packagerebase-1.21.2
  • Exports3
  • LanguageHaskell2010
  • LicenceMIT
  • SourceUnique.hs
newtypenewtype Unique
#

An abstract unique object. Objects of type Unique may be compared for equality and ordering and hashed into Int.

Example1 expression
:{do x <- newUnique   print (x == x)   y <- newUnique   print (x == y):}TrueFalse
Instances4Eq, Ord, NFData, Hashable
  • Eq UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Unique
  • Ord UniqueDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Unique
  • NFData UniqueDefined in deepseq-1.5.0.0 · Control.DeepSeq
  • Hashable UniqueDefined in hashable-1.4.7.0 · Data.Hashable.Class
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 newUnique may be called.