@@ -19,6 +19,8 @@ module Data.UUID.Internal
19 ,toByteString
19 ,toByteString
20 ,fromString
20 ,fromString
22 ,buildFromBytes
24 ,buildFromBytes
23 ,buildFromWords
25 ,buildFromWords
@@ -68,6 +70,16 @@ data UUID = UUID !Word32 !Word32 !Word32 !Word32
68 None was as fast, overall, as the representation used here.
70 None was as fast, overall, as the representation used here.
73+-- | Covert a 'UUID' into a sequence of 'Word32' values.
74+-- Usefull for when you need to serialize a UUID and
75+-- neither 'Storable' nor 'Binary' are appropriate.
76+toWords :: UUID -> (Word32, Word32, Word32, Word32)
77+toWords (UUID w1 w2 w3 w4) = (w1, w2, w3, w4)
79+-- | Create a 'UUID' from a sequence of 'Word32'. The
80+-- opposite of 'toWords'.
81+fromWords :: Word32 -> Word32 -> Word32 -> Word32 -> UUID
73-- UTILITIES
85-- UTILITIES