
On Mon, Apr 4, 2011 at 6:41 AM, Bas van Dijk
Thanks for the clarification Daniel.
I just read[1] it's also possible to directly use Double and Float in an FFI import declaration. I always assumed you could only use the C types from Foreign.C.Types. So I think I'm going to change bindings-levmar[2] to use Double and Float instead of CDouble and CFloat. This way I don't even need to map.
It's just that on some platforms/Haskell implementations the Haskell Double/Float may not line up with the C side. If you use CDouble/CFloat it will line up. Compared to unsafeCoerce, I would hope you'd get a C compile error on those platforms, but I don't know for certain if that's the case. In my opinion, it's the conversion functions that need to be fixed. Jason