Skip to content

Commit 277c4c4

Browse files
committed
add doc tweaks and changelog edit
1 parent d96d140 commit 277c4c4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Data/Vector/Storable/Mutable.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,17 @@ storableSetAsPrim n fp x _y = withForeignPtr fp $ \ ptr -> do
201201
poke ptr x
202202
-- we dont equate storable and prim reps, so we need to write to a slot
203203
-- in storable
204-
-- then read it back as a prim
204+
-- then read it back as a prim type
205+
-- then use prim memset
205206
w<- peakPrimPtr_vector ((castPtr ptr) :: Ptr b) 0
206207
memsetPrimPtr_vector ((castPtr ptr) `plusPtr` sizeOf x ) (n-1) w
207208

208209

209210

210211
{-
211212
AFTER primitive 0.7 is pretty old, move to using setPtr. which is really
212-
a confusing misnomer for whats often called memset (intialize )
213+
a confusing misnomer for whats often called memset (initialize an array with a
214+
default value)
213215
-}
214216
-- Fill a memory block with the given value. The length is in
215217
-- elements of type @a@ rather than in bytes.

changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Changes in version 0.12.0.2
22
* Fixes issue #220, compact heap operations crashing on boxed vectors constructed
33
using traverse.
4+
* remove usage of Data.Primitive.Address and clarify the memset Prim Storable
5+
smuggling trick in Vector.Storable.Mutable
46

57
Changes in version 0.12.0.1
68

vector.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Library
145145
vector.h
146146

147147
Build-Depends: base >= 4.5 && < 4.13
148-
, primitive >= 0.5.0.1 && < 0.7
148+
, primitive >= 0.5.0.1 && < 0.8
149149
, ghc-prim >= 0.2 && < 0.6
150150
, deepseq >= 1.1 && < 1.5
151151
if !impl(ghc > 8.0)

0 commit comments

Comments
 (0)