A module defining UUIDs in the general, and providing functions for encoding, decoding and formatting UUIDs.
Used to denote version of version 4 UUIDs.
Used to denote variation of variation 1 UUIDs.
Used to denote variation of variation 2 UUIDs.
Used to denote version and variant of the nil UUID.
The nil UUID. This is the special UUID "00000000-0000-0000-0000-000000000000".
Encode a UUID of any version or variant as a JSON string.
Json.Encode.encode 0 (encode 0 nil) == "\"00000000-0000-0000-0000-000000000000\""Decodes a UUID of any version or variant from a JSON string.
"\"123e4567-e89b-12d3-a456-426655440000\""
|> Json.Decode.decodeString decoder
|> canonical -- == "123e4567-e89b-12d3-a456-426655440000"Convert UUID to canonical textual representation
canonical nil == "00000000-0000-0000-0000-000000000000"Convert UUID to Microsoft GUID representation
microsoftGUID nil == "{00000000-0000-0000-0000-000000000000}"Convert UUID to URN-namespaced representation
urn nil == "urn:uuid:00000000-0000-0000-0000-000000000000"
Opaque type to encapsulate UUIDs. Uses phantom types to provide information about version and variant.