on master help sign in
Unpack components of UUID into constructor
commit15a233c66f782047133a5b90e0cecb14d18b9b27 authorAntoine Latter <aslatter@gmail.com> dateWed 14 Mar 2012, 02:18 (15 years ago) parentb11962a
1 file changed+7−2
Data/UUID/Internal.hs+7−2
Data/UUID/Internal.hs+7−2
@@ -2,7 +2,7 @@
22
33-- |
44-- Module : Data.UUID
5−-- Copyright : (c) 2008-2009 Antoine Latter
5+-- Copyright : (c) 2008-2009, 2012 Antoine Latter
66-- (c) 2009 Mark Lentczner
77--
88-- License : BSD-style
@@ -55,7 +55,12 @@ import System.Random
5555-- version 4 UUIDs as specified in RFC 4122. The 'Storable' and
5656-- 'Binary' instances are compatible with RFC 4122, storing the fields
5757-- 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
5964 deriving (Eq, Ord, Typeable)
6065{-
6166 Other representations that we tried are: