uuid-0.1.1: For creating, comparing, parsing and printing Universally Unique Identifiers

Portabilityportable
Stabilityexperimental
Maintaineraslatter@gmail.com

Data.UUID.Internal

Description

If the public interface in Data.UUID doesn't give you the flexibility you need, you should be able to find something here.

Synopsis

Documentation

newtype UUID Source

The UUID type. Represents 128-bits of identification.

Constructors

U (ForeignPtr CChar) 

toBytes :: UUID -> [Word8]Source

Returns the passed in UUID as a list of 16 bytes.

fromBytes :: [Word8] -> UUIDSource

Creates a UUID out of a list of bytes. Will throw an error if the list is not of length 16.

unsafeFromBytes :: [Word8] -> UUIDSource

Creates a UUID out of a list of bytes. Does not perform a length check on the passed in list. Behavior is undefined for lists not of length 16.

toForeignPtr :: UUID -> ForeignPtr CCharSource

Unsafe.

Given a UUID, returns a pointer to the 16 bytes of memory that make up the UUID.

fromForeignPtr :: ForeignPtr CChar -> UUIDSource

Unsafe.

The passed in pointer is treated as if it were a pointer to 16 bytes of memory, which is then returned as a UUID.