For creating, comparing, parsing and printing Universally Unique Identifiers https://github.com/hvr/uuid

LTS Haskell 9.14:1.3.13
Stackage Nightly 2017-11-20:1.3.13
Latest on Hackage:1.3.13
BSD3 licensed by Antoine Latter
Maintained by hvr@gnu.org

Module documentation for 1.3.13

This library is useful for creating, comparing, parsing and printing Universally Unique Identifiers.

See http://en.wikipedia.org/wiki/UUID for the general idea.



  • Optimize V4.nextRandom (~3x speed increase)
  • Optimize UUID V3 & V5 generation (~2x speed increase)
  • Use cryptohash-md5/cryptohash-sha1/entropy instead of memory/cryptonite for better performance and stability.
  • Update cabal-spec to version 1.10


  • Update package dependencies
  • Use cryptonite for crypto
  • The function V4.nextRandom is now implemented with functions from Crypto.Random in package cryptonite. This does slow-down random UUID generation but provides for far greater randomness. The Random instance for UUID can be used to re-gain the old behavior.


  • Add toText/fromText


  • Update dependencies in tests and benchmarks.


  • Split definition of UUID data type into separate Cabal package to enable 3rd party libraries to avoid some of the larger dependencies.


  • Allow building against newer deepseq.


  • Allow building against newer time.


  • Move to GitHub.


  • Allow building against newer random.


  • Allow building against newer QuickCheck.


  • More complex version constraints on hashable, to avoid building against versions less than or equal to 1.2.0.*.


  • Fix for building against bytestring 0.9.*


  • Allow building against hashable 1.1. in addition to 1.2.


  • New functions for parsing and printing UUIDs to and from ASCII BytesStrings
  • New module Data.UUID.Util. This module includes the type UnpackedUUID, whose fields correspond to the UUID fields described in RFC 4122.
  • The Storable instance now stores a UUID in host byte-order instead of big endian.
  • There is now an instance for Hashable UUID.


Benchmark only changes:

  • Allow criterion 0.8.*


Test only changes:

  • Allow QuickCheck 2.6.*


  • Allow binary 0.7.*


  • Allow cryptohash version 0.9.*
  • Cleanup tests


  • Bumped dependency on cryptohash.


  • Bumped various dependencies and cleaned up dependencies in general.


  • Added stricter constraints on random package.


  • Add module V4 to direct attention to our Random instance

  • In module V1 seed the generator with a random number if the hardware MAC address could not be discovered.

  • Fix and cleanup various haddocks.

  • In module docs, warn about MD5 use in Data.UUID.V3 and encourage the reader to use Data.UUID.V5 instead.


  • Use cryptohash package for MD5 and SHA1 instead of Crypto


  • Unpack Word32 values into UUID constructor.

  • Update test suite to QuickCheck 2

  • Bump other dependencies in tests/benchmarks


  • The Read instance now drops leading spaces in the string to be parsed. Thanks to Marc Ziegert for reporting this bug.

  • The tests have moved over to the new Cabal test running framework.


  • Add functions fromWords/toWords

The goal was to have a total function that can be used to construct a UUID, primarily for use by uuid-th.


  • Fix concurrency bug in Data.UUID.V1 (thanks to Neil Mitchell for reporting and a test case)

1.2.0 (Contributors: Antoine Latter & Mark Lentczner)

  • added functions toByteString and fromByteString
  • added nil UUID
  • added unit tests and benchmarks, built when configured -ftest
  • major speed up of to/from functions (as well as in general)
  • added version-3 generation (deterministic based on MD5)
  • major changes to internal representation
    • now uses four strict Word32 values
    • internal ByteSource classes for easy construction (see Builder.hs)
  • Storable instance now stores in memory as system libraries in C do: 16 bytes derived from the network order of the fields, no matter what the host native endianess is.
  • fixed bugs in V1 time and clock stepping, and V1 generated values
  • builds cleanly under GHC's -Wall
  • added CHANGES file


  • no longer exporting null from the prelude
  • add null predicate on UUIDs
  • documentation fix (thanks Mark Lentczner)
Used by 125 packages:
abeson, appc, ble, canteven-http, cassandra-cql, cielo, clckwrks-plugin-mailinglist, clckwrks-plugin-page, cloud-seeder, coinbase-exchange, concrete-haskell, couch-simple, courier, cql, cql-io, debug-me, docker, eventful-core, eventful-sql-common, eventful-sqlite, eventsource-api, eventsource-store-specs, eventstore, flowdock, freddy, gdax, genvalidity-uuid, git-annex, github-webhook-handler, github-webhook-handler-snap, gitit, gremlin-haskell, guid, hadoop-rpc, hascas, hasql-generic, hasql-postgres, hblock, hbro, hdbi, hdbi-postgresql, hdbi-tests, help-esb, hen, HFitUI, hoodle-core, hoodle-publish, hoodle-render, hoodle-types, hs-pkpass, hworker, hydrogen-prelude, hydrogen-syntax, ihaskell, ipython-kernel, jupyter, katip-elasticsearch, laborantin-hs, lambdacms-core, legion, libsystemd-journal, linden, llsd, loup, mealstrom, mqtt, mvclient, nakadi-client, nemesis-titan, network-anonymous-i2p, network-transport-amqp, newt, opaleye, opaleye-sqlite, orizentic, PageIO, pdf-slave-server, pgstream, postgresql-binary, postgresql-typed, postie, preamble, project-m36, pubnub, Quelea, rados-haskell, ratel, raven-haskell, rebase, rest-core, rest-types, servant-auth-token, servant-auth-token-acid, servant-auth-token-leveldb, servant-auth-token-persistent, servant-auth-token-rocksdb, servant-csharp, setdown, shelduck, simple-logging, smaoin, special-keys, squeal-postgresql, ssh-tunnel, stego-uuid, uid, users-mysql-haskell, users-persistent, users-postgresql-simple, uuid-aeson, uuid-crypto, uuid-le, uuid-quasi, validity-uuid, wai-middleware-rollbar, websockets-rpc, Wheb, wolf, xml-push, xmpipe, yesod-auth-nopassword, yesod-crud, yesod-job-queue, yql, zre
comments powered byDisqus