@@ -1,19 +1,26 @@
1{-# OPTIONS_GHC -fno-cse #-}
1{-# OPTIONS_GHC -fno-cse #-}
2{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE TypeFamilies #-}
5−-- Module : Data.UUID.V1
5+Module : Data.UUID.V1
6−-- Copyright : (c) 2008 Jason Dusek
6+Copyright : (c) 2008 Jason Dusek
7−-- (c) 2009 Mark Lentczner
7+ (c) 2009 Mark Lentczner
8−-- (c) 2009-2010,2012 Antoine Latter
8+ (c) 2009-2010,2012 Antoine Latter
10−-- License : BSD-style
10+License : BSD-style
12−-- Maintainer : aslatter@gmail.com
12+Maintainer : aslatter@gmail.com
13−-- Stability : experimental
13+Stability : experimental
14−-- Portability : portable
14+Portability : portable
16−-- RFC 4122 Version 1 UUID state machine.
16+RFC 4122 Version 1 UUID state machine.
18+The generated UUID is based on the hardware MAC
19+address and the system clock.
21+If we cannot lookup the MAC address we seed the
22+generator with a psuedo-random number.
18module Data.UUID.V1(nextUUID)
25module Data.UUID.V1(nextUUID)
@@ -40,8 +47,7 @@ import Data.UUID.Internal
40-- Is generated according to the Version 1 UUID sepcified in
47-- Is generated according to the Version 1 UUID sepcified in
41-- RFC 4122.
48-- RFC 4122.
43−-- Returns nothing if the hardware MAC address could not
50+-- Returns 'Nothing' if you request UUIDs too quickly.
45nextUUID :: IO (Maybe UUID)
51nextUUID :: IO (Maybe UUID)
46nextUUID = do
52nextUUID = do
47 res <- stepTime
53 res <- stepTime