ndmitchell:
> Hi,
>
> I'm trying to write out a binary file, in particular I want the
> following functions:
>
> hPutInt :: Handle -> Int -> IO ()
>
> hGetInt :: Handle -> IO Int
>
> For the purposes of these functions, Int = 32 bits, and its got to
> roundtrip - Put then Get must be the same.
>
> How would I do this? I see Ptr, Storable and other things, but nothing
> which seems directly useable for me.
>
use the Binary class (or one of its cousins)
darcs get http://www.n-heptane.com/nhlab/repos/NewBinary
-- Don
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe