[Haskell-cafe] Writing binary files

Bulat Ziganshin bulat.ziganshin at gmail.com
Tue Aug 22 06:36:01 EDT 2006


Hello Alistair,

Tuesday, August 22, 2006, 1:29:22 PM, you wrote:

> What's wrong with the following i.e. what assumptions is it making
> (w.r.t. pointers) that I've missed? Is endian-ness an issue here?

data written by your module on big-endian machine, can't be read by
the same module in the little-end machine

>   bytes <- hGetBuf h p (sizeOf int32)

or

bytes <- hGetBuf h p (sizeOf (0::Int32))

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list