on master help sign in
Unpack components of UUID into constructor
15a233cAntoine Latter
Data/UUID/Internal.hs+7−2
@@ -2,7 +2,7 @@
2
2
3-- |
3-- |
4-- Module : Data.UUID
4-- Module : Data.UUID
5−-- Copyright : (c) 2008-2009 Antoine Latter
5+-- Copyright : (c) 2008-2009, 2012 Antoine Latter
6-- (c) 2009 Mark Lentczner
6-- (c) 2009 Mark Lentczner
7--
7--
8-- License : BSD-style
8-- License : BSD-style
@@ -55,7 +55,12 @@ import System.Random
55-- version 4 UUIDs as specified in RFC 4122. The 'Storable' and
55-- version 4 UUIDs as specified in RFC 4122. The 'Storable' and
56-- 'Binary' instances are compatible with RFC 4122, storing the fields
56-- 'Binary' instances are compatible with RFC 4122, storing the fields
57-- in network order as 16 bytes.
57-- in network order as 16 bytes.
58−data UUID = UUID !Word32 !Word32 !Word32 !Word32
58+data UUID
59+ = UUID
60+ {-# UNPACK #-} !Word32
61+ {-# UNPACK #-} !Word32
62+ {-# UNPACK #-} !Word32
63+ {-# UNPACK #-} !Word32
59 deriving (Eq, Ord, Typeable)
64 deriving (Eq, Ord, Typeable)
60{-
65{-
61 Other representations that we tried are:
66 Other representations that we tried are: