=20 > | How would one implement an CStringLen-style type that > | [...] >=20 > Take a look at: >=20 > http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/Lab2/Chunk.hs >=20 > Is that what you want? Only one comment: use mallocForeignPtr and it'll go a lot faster with GHC! Cheers, Simon