@@ -1,19 +1,26 @@
11{-# OPTIONS_GHC -fno-cse #-}
22{-# LANGUAGE TypeFamilies #-}
33
4−-- |
5−-- Module : Data.UUID.V1
6−-- Copyright : (c) 2008 Jason Dusek
7−-- (c) 2009 Mark Lentczner
8−-- (c) 2009-2010,2012 Antoine Latter
9−--
10−-- License : BSD-style
11−--
12−-- Maintainer : aslatter@gmail.com
13−-- Stability : experimental
14−-- Portability : portable
15−--
16−-- RFC 4122 Version 1 UUID state machine.
4+{- |
5+Module : Data.UUID.V1
6+Copyright : (c) 2008 Jason Dusek
7+ (c) 2009 Mark Lentczner
8+ (c) 2009-2010,2012 Antoine Latter
9+
10+License : BSD-style
11+
12+Maintainer : aslatter@gmail.com
13+Stability : experimental
14+Portability : portable
15+
16+RFC 4122 Version 1 UUID state machine.
17+
18+The generated UUID is based on the hardware MAC
19+address and the system clock.
20+
21+If we cannot lookup the MAC address we seed the
22+generator with a psuedo-random number.
23+-}
1724
1825module Data.UUID.V1(nextUUID)
1926where
@@ -40,8 +47,7 @@ import Data.UUID.Internal
4047-- Is generated according to the Version 1 UUID sepcified in
4148-- RFC 4122.
4249--
43−-- Returns nothing if the hardware MAC address could not
44−-- be discovered.
50+-- Returns 'Nothing' if you request UUIDs too quickly.
4551nextUUID :: IO (Maybe UUID)
4652nextUUID = do
4753 res <- stepTime