on master help sign in
Call out random instance with its own module
df517b3Antoine Latter
Data/UUID/V4.hsnew file+28
@@ -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+
uuid.cabal+1
@@ -33,6 +33,7 @@ Library
33 Data.UUID
33 Data.UUID
34 Data.UUID.V1
34 Data.UUID.V1
35 Data.UUID.V3
35 Data.UUID.V3
36+ Data.UUID.V4
36 Data.UUID.V5
37 Data.UUID.V5
37
38
38 Other-Modules:
39 Other-Modules: