
25 Jul
2012
25 Jul
'12
7:12 a.m.
I want to copy a piece of memory addressed by a Ptr Word8 into a ByteString. I only found packCStringLen for that purpose but it expects a Ptr CChar as input. Since ByteString represents a sequence of Word8 I thought that the most natural input for packCStringLen should be (Ptr Word8). Of course I can use castPtr but that always looks like a hack.