If you're bored... can you come up with a solution to this?
http://warp.povusers.org/ProgrammingChallenge.html
(Obviously a pretty silly challenge, but hey.)
My first instinct was to use Data.Bits - but I see no instance for
Double. (Presumably because performing bitwise operations on a Double is
a pretty odd thing to want to do.) So my next guess is to do some
bizzare type system hackery that allows you to transform a Double
into... whichever integer type is the same size, and proceed from there.
Does anybody know how to do that?
(Otherwise... wasn't there some library somewhere for serialising values
in binary?)
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe