[Haskell-cafe] ANN: ieee version 0.7

John Millikin jmillikin at gmail.com
Mon Sep 20 23:18:14 EDT 2010

On Mon, Sep 20, 2010 at 03:22, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> unsafeCoerce is not supposed to work for casts between Integral and
> Floating types. If you try to unsafeCoerce# between unboxed types, say
> Double# and Word64#, you're likely to get a compile failure (ghc panic).
> If you unsafeCoerce between the boxed types, it will probably work, but
> there are no guarantees.
> There's a feature request for unboxed coercion (i.e. reinterpretation of
> the bit-pattern):
> http://hackage.haskell.org/trac/ghc/ticket/4092

Interesting -- in that bug report, Simon Mar says that converting the
value using pointers will work correctly. I've changed d-b-ieee754
over to use this method (v 0.4.2); the tests are still passing, so
I'll call it success.

More information about the Haskell-Cafe mailing list