On Thu, Jul 08, 2010 at 04:49:00PM +0200, Daniel Fischer wrote: > If there are more pitfalls, is there any chance of getting a function which > reinterprets the bit-patterns?
Hi, you can do something like this (untested): castWordToFloat :: Word32 -> Float castWordToFloat w = unsafePerformIO $ do alloca w $ \pw -> do peek (castPtr pw) John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/ _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users