@@ -0,0 +1,28 @@
1+{- |
2+ Module : Data.UUID.V4
3+ Copyright : (c) 2012 Antoine Latter
4+
5+ License : BSD-style
6+
7+ Maintainer : aslatter@gmail.com
8+ Stability : experimental
9+ Portability : portable
10+
11+ This module implements Version 4 UUIDs as specified
12+ in RFC 4122.
13+
14+ These UUIDs are generated from a psuedo-random generator.
15+ We use the System.Random 'R.StdGen' as our random source.
16+
17+ All of the logic is encapsulated in the 'R.Random' instance
18+ for the UUID type, so you are free to use the random generator
19+ of your choice.
20+-}
21+module Data.UUID.V4 (nextRandom) where
22+
23+import Data.UUID
24+import qualified System.Random as R
25+
26+nextRandom :: IO UUID
27+nextRandom = R.randomIO
28+