On 8/19/07, Matthew Sackman <[EMAIL PROTECTED]> wrote:
> But it's vastly harder to do that for floats / non-integers. Now I know
> that the number classes in the Prelude are basically broken anyway and
> all really need rewriting, but it does seem completely arbitrary that
> Words somehow are only allowed to contain whole numbers!

Well, see the attached patch to Data.Binary to add
putFloat[32|64][be|le]. I got bored, so adding the Get functions is an
exercise for the reader :)

(And so because I think it needs unsafeSomethingIO and I'm a little
unsure about that).

If these functions would be useful for you, you should bug the binary
team to add something similar.


AGL

-- 
Adam Langley                                      [EMAIL PROTECTED]
http://www.imperialviolet.org                       650-283-9641

Attachment: data-binary-float.darcs
Description: Binary data

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to