on master help sign in
documentation improvements
36bcbf8Antoine Latter
Data/UUID.hs+25−18
@@ -1,21 +1,28 @@
1−-- |
1+{- |
2−-- Module : Data.UUID
2+Module : Data.UUID
3−-- Copyright : (c) 2008 Antoine Latter
3+Copyright : (c) 2008,2012 Antoine Latter
4−--
4+
5−-- License : BSD-style
5+License : BSD-style
6−--
6+
7−-- Maintainer : aslatter@gmail.com
7+Maintainer : aslatter@gmail.com
8−-- Stability : experimental
8+Stability : experimental
9−-- Portability : portable
9+Portability : portable
10−--
10+
11−--
11+
12−-- This library is useful for comparing, parsing and
12+This library is useful for comparing, parsing and
13−-- printing Universally Unique Identifiers.
13+printing Universally Unique Identifiers.
14−-- See <http://en.wikipedia.org/wiki/UUID> for the general idea.
14+See <http://en.wikipedia.org/wiki/UUID> for the general idea.
15−-- See <http://tools.ietf.org/html/rfc4122> for the specification.
15+See <http://tools.ietf.org/html/rfc4122> for the specification.
16−--
16+
17−-- For generating UUIDs, check out 'Data.UUID.V1', 'Data.UUID.V5' and
17+* Random UUIDs may be generated using 'Data.UUID.V4.nextRandom' or
18−-- 'System.Random'.
18+your favorite instance of 'System.Random.Random'.
19+
20+* We have an implementation of generating a UUID from the hardware
21+MAC address and current system time in "Data.UUID.V1".
22+
23+* For name-based generation of UUIDs using SHA-1 hashing see
24+"Data.UUID.V5".
25+-}
19
26
20module Data.UUID(UUID
27module Data.UUID(UUID
21 ,toString
28 ,toString
Data/UUID/V3.hs+24−19
@@ -1,23 +1,28 @@
1−-- |
1+{- |
2−-- Module : Data.UUID.V3
2+Module : Data.UUID.V3
3−-- Copyright : (c) 2010 Antoine Latter
3+Copyright : (c) 2010,2012 Antoine Latter
4−--
4+
5−-- License : BSD-style
5+License : BSD-style
6−--
6+
7−-- Maintainer : aslatter@gmail.com
7+Maintainer : aslatter@gmail.com
8−-- Stability : experimental
8+Stability : experimental
9−-- Portability : portable
9+Portability : portable
10−--
10+
11−--
11+NOTE: This module uses MD5 hashing. Unless you know
12+you need to use this module, you should probably be
13+using "Data.UUID.V5", which offers the same sort of
14+functionality as this module except implemented with
15+SHA-1 hashing.
16+
12−-- This module implements Version 3 UUIDs as specified
17+This module implements Version 3 UUIDs as specified
13−-- in RFC 4122.
18+in RFC 4122.
14−--
19+
15−-- These UUIDs identify an object within a namespace,
20+These UUIDs identify an object within a namespace,
16−-- and are deterministic.
21+and are deterministic.
17−--
18−-- The namespace is identified by a UUID. Several sample
19−-- namespaces are enclosed.
20
22
23+The namespace is identified by a UUID. Several sample
24+namespaces are enclosed.
25+-}
21module Data.UUID.V3
26module Data.UUID.V3
22 (generateNamed
27 (generateNamed
23 ,Shared.namespaceDNS
28 ,Shared.namespaceDNS
Data/UUID/V4.hs+1−1
@@ -15,7 +15,7 @@
15 We use the System.Random 'R.StdGen' as our random source.
15 We use the System.Random 'R.StdGen' as our random source.
16
16
17 All of the logic is encapsulated in the 'R.Random' instance
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
18+ for the UUID type, so you are also free to use the random generator
19 of your choice.
19 of your choice.
20-}
20-}
21module Data.UUID.V4 (nextRandom) where
21module Data.UUID.V4 (nextRandom) where