-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Splittable Unique Identifier Supply -- -- This package provides splittable supplies of unique identifiers. The -- implementation mimics (only) essential parts of the code that is used -- internally in GHC for the same purpose. After improvements of the -- value-supply package it is now deprecated. @package uniqueid @version 0.1.1 -- | This module provides splittable supplies for unique identifiers. The -- main idea gows back to L. Augustsson, M. Rittri, and D. Synek and is -- described in their paper 'On generating unique names' (Journal of -- Functional Programming 4(1), 1994. pp. 117-123). The implementation at -- hand is taken from the GHC sources and includes bit fiddling to allow -- multiple supplies that generate unique identifiers by prepending a -- character given at initialization. module Data.Unique.Id -- | Unique identifiers are of type Id and can be hashed to an -- Int usning the function hashedId. data Id hashedId :: Id -> Int -- | Supplies for unique identifiers are of type IdSupply and can be -- split into two new supplies or yield a unique identifier. data IdSupply -- | Generates a new supply of unique identifiers. The given character is -- prepended to generated numbers. initIdSupply :: Char -> IO IdSupply -- | Splits a supply of unique identifiers to yield an infinite list of -- them. splitIdSupplyL :: IdSupply -> [IdSupply] -- | Splits a supply of unique identifiers to yield two of them. splitIdSupply :: IdSupply -> (IdSupply, IdSupply) -- | Yields the unique identifier from a supply. idFromSupply :: IdSupply -> Id instance Show Id instance Ord Id instance Eq Id