Foreign import broken in NCG, 5.02.2?
glafp-utils/nofib-analyse generates reports with all
floating values "0.00" on my system
(i386-unknown-linux, Linux rhine.cl.cam.ac.uk
2.4.7-9.clsmp #1 SMP Mon Dec 24 17:44:31 GMT 2001 i686
unknown). I was able to work around this by using
-fvia-c for module Printf.lhs (part of nofib-analyse).
The import of snprintf that is returning "0.00" is:
#if __GLASGOW_HASKELL__ < 500
> type PackedString = ByteArray Int
> foreign import unsafe snprintf :: Addr -> CSize ->
PackedString -> Float -> IO ()
#else
> foreign import unsafe snprintf :: CString -> CSize ->
CString -> Float -> IO ()
#endif
Thanks..
--KW 8-)
Trac metadata
Trac field |
Value |
Version |
5.02 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
Compiler (FFI) |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|