Unsafe aspects of ByteString

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sun Jan 28 14:22:29 EST 2007


On Sun, 2007-01-28 at 09:58 -0800, Iavor Diatchki wrote:
> Hello,
> The "packCString" function (and other similar functions) in the
> ByteString library break referential transperancy, which is one of the
> big selling points of Haskell (and its libraries).


> I think that because of this we should either remove these functions,
> or at least follow the convention of other libraries and give them
> "unsafe" names.

We can put them in the IO monad. The same applies to packCStringLen and
packMallocCString.

Duncan



More information about the Libraries mailing list