-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | For creating, comparing, parsing and printing Universally Unique Identifiers
--   
--   This library is useful for creating, comparing, parsing and printing
--   Universally Unique Identifiers. See
--   http://en.wikipedia.org/wiki/UUID for the general idea.
@package uuid
@version 1.2.3

-- | RFC 4122 Version 1 UUID state machine.
module Data.UUID.V1

-- | Returns a new UUID derived from the local hardware MAC address and the
--   current system time. Is generated according to the Version 1 UUID
--   sepcified in RFC 4122.
--   
--   Returns nothing if the hardware MAC address could not be discovered.
nextUUID :: IO (Maybe UUID)
instance Show State
instance ByteSource MACSource

-- | This module implements Version 3 UUIDs as specified in RFC 4122.
--   
--   These UUIDs identify an object within a namespace, and are
--   deterministic.
--   
--   The namespace is identified by a UUID. Several sample namespaces are
--   enclosed.
module Data.UUID.V3

-- | Generate a UUID within the specified namespace out of the given
--   object.
--   
--   Uses an MD5 hash. The UUID is built from first 128 bits of the hash of
--   the namespace UUID and the name (as a series of Word8).
generateNamed :: UUID -> [Word8] -> UUID

-- | The namespace for DNS addresses
namespaceDNS :: UUID

-- | The namespace for URLs
namespaceURL :: UUID

-- | The namespace for ISO OIDs
namespaceOID :: UUID

-- | The namespace for X.500 DNs
namespaceX500 :: UUID

-- | This module implements Version 5 UUIDs as specified in RFC 4122.
--   
--   These UUIDs identify an object within a namespace, and are
--   deterministic.
--   
--   The namespace is identified by a UUID. Several sample namespaces are
--   enclosed.
module Data.UUID.V5

-- | Generate a UUID within the specified namespace out of the given
--   object.
--   
--   Uses a SHA1 hash. The UUID is built from first 128 bits of the hash of
--   the namespace UUID and the name (as a series of Word8).
generateNamed :: UUID -> [Word8] -> UUID

-- | The namespace for DNS addresses
namespaceDNS :: UUID

-- | The namespace for URLs
namespaceURL :: UUID

-- | The namespace for ISO OIDs
namespaceOID :: UUID

-- | The namespace for X.500 DNs
namespaceX500 :: UUID

-- | This library is useful for comparing, parsing and printing Universally
--   Unique Identifiers. See http://en.wikipedia.org/wiki/UUID for
--   the general idea. See http://tools.ietf.org/html/rfc4122 for
--   the specification.
--   
--   For generating UUIDs, check out V1, V5 and
--   Random.
module Data.UUID

-- | The UUID type. A Random instance is provided which produces
--   version 4 UUIDs as specified in RFC 4122. The Storable and
--   Binary instances are compatible with RFC 4122, storing the
--   fields in network order as 16 bytes.
data UUID

-- | Convert a UUID into a hypenated string using lower-case letters.
--   Example:
--   
--   
--   toString $ fromString "550e8400-e29b-41d4-a716-446655440000"
--   
toString :: UUID -> String

-- | If the passed in String can be parsed as a UUID, it will
--   be. The hyphens may not be omitted. Example:
--   
--   
--   fromString "c2cc10e1-57d6-4b6f-9899-38d972112d8c"
--   
--   
--   Hex digits may be upper or lower-case.
fromString :: String -> Maybe UUID

-- | Encode a UUID into a ByteString in network order.
toByteString :: UUID -> ByteString

-- | Extract a UUID from a ByteString in network byte order. The
--   argument must be 16 bytes long, otherwise Nothing is returned.
fromByteString :: ByteString -> Maybe UUID

-- | Covert a UUID into a sequence of Word32 values. Usefull
--   for when you need to serialize a UUID and neither Storable nor
--   Binary are appropriate.
toWords :: UUID -> (Word32, Word32, Word32, Word32)

-- | Create a UUID from a sequence of Word32. The opposite of
--   toWords.
fromWords :: Word32 -> Word32 -> Word32 -> Word32 -> UUID

-- | Returns true if the passed-in UUID is the nil UUID.
null :: UUID -> Bool

-- | The nil UUID, as defined in RFC 4122. It is a UUID of all zeros.
--   null u iff u == nil.
nil :: UUID
