@@ -20,7 +20,7 @@ module Data.UUID(UUID
21 ,toStringUpper
21 ,toStringUpper
22 ,toStringLower
22 ,toStringLower
23− ,generate
23+ ,generate
24 ,generateRandom
24 ,generateRandom
25 ,generateTime
25 ,generateTime
@@ -124,20 +124,20 @@ instance Storable UUID where
125 peek p = do
125 peek p = do
126 tl <- peek $ castPtr p
126 tl <- peek $ castPtr p
127− tm <- peekByteOff (castPtr p) 4
127+ tm <- peekByteOff p 4
128− th <- peekByteOff (castPtr p) 6
128+ th <- peekByteOff p 6
129− ch <- peekByteOff (castPtr p) 8
129+ ch <- peekByteOff p 8
130− cl <- peekByteOff (castPtr p) 9
130+ cl <- peekByteOff p 9
131− node <- peekByteOff (castPtr p) 10
131+ node <- peekByteOff p 10
132 return $ UUID tl tm th ch cl node
132 return $ UUID tl tm th ch cl node
134 poke p (UUID tl tm th ch cl node) = do
134 poke p (UUID tl tm th ch cl node) = do
135 poke (castPtr p) tl
135 poke (castPtr p) tl
136− pokeByteOff (castPtr p) 4 tm
136+ pokeByteOff p 4 tm
137− pokeByteOff (castPtr p) 6 th
137+ pokeByteOff p 6 th
138− pokeByteOff (castPtr p) 8 ch
138+ pokeByteOff p 8 ch
139− pokeByteOff (castPtr p) 9 cl
139+ pokeByteOff p 9 cl
140− pokeByteOff (castPtr p) 10 node
140+ pokeByteOff p 10 node
142instance Storable Node where
142instance Storable Node where
143 sizeOf _ = 6
143 sizeOf _ = 6
@@ -145,20 +145,20 @@ instance Storable Node where
146 peek p = do
146 peek p = do
147 w1 <- peek $ castPtr p
147 w1 <- peek $ castPtr p
148− w2 <- peekByteOff (castPtr p) 1
148+ w2 <- peekByteOff p 1
149− w3 <- peekByteOff (castPtr p) 2
149+ w3 <- peekByteOff p 2
150− w4 <- peekByteOff (castPtr p) 3
150+ w4 <- peekByteOff p 3
151− w5 <- peekByteOff (castPtr p) 4
151+ w5 <- peekByteOff p 4
152− w6 <- peekByteOff (castPtr p) 5
152+ w6 <- peekByteOff p 5
153 return $ Node w1 w2 w3 w4 w5 w6
153 return $ Node w1 w2 w3 w4 w5 w6
155 poke p (Node w1 w2 w3 w4 w5 w6) = do
155 poke p (Node w1 w2 w3 w4 w5 w6) = do
156 poke (castPtr p) w1
156 poke (castPtr p) w1
157− pokeByteOff (castPtr p) 1 w2
157+ pokeByteOff p 1 w2
158− pokeByteOff (castPtr p) 2 w3
158+ pokeByteOff p 2 w3
159− pokeByteOff (castPtr p) 3 w4
159+ pokeByteOff p 3 w4
160− pokeByteOff (castPtr p) 4 w5
160+ pokeByteOff p 4 w5
161− pokeByteOff (castPtr p) 5 w6
161+ pokeByteOff p 5 w6
163-- My goal with this instance was to make it work just enough to do what
163-- My goal with this instance was to make it work just enough to do what
164-- I want when used with the HStringTemplate library.
164-- I want when used with the HStringTemplate library.