Hello Peter,

Tuesday, February 07, 2006, 4:05:55 AM, you wrote:

PS>  | Examples$ ghc -i..  -O2 -funbox-strict-fields --make wc.hs -o wc

btw, in my programs (and in this lib) i explicitly unbox all the
strict fields with simple types  because automatic unboxing can lead
to losed sharing of complex datastructures

PS>  | Chasing modules from: wc.hs
PS>  | [ 1 of 16] Compiling System.FD        ( ../System/FD.hs, ../System/FD.o )
PS>  |
PS>  | /tmp/ghc9376_0.hc:6:16:  io.h: No such file or directory
PS>  | /tmp/ghc9376_0.hc: In function `SystemziFD_zdwccall_entry':

it should be replaced by HsBase.h, i erroneously thinks that io.h is
available on Unix systems. HsBase.h determines itself where we can
find all definitions of these low-level functions

PS>  |      warning: implicit declaration of function `_eof'

it should be "eof"

PS>  |      warning: implicit declaration of function `filelength'

it should be found via HsBase.h, is not?

PS>  |      warning: implicit declaration of function `tell'

ditto

PS> I also downloaded the new release archive, just to be sure. but
PS> it doesn't contain a file "io.h" either. Is that a system header?

yes, in mingw :)

i attached updated FD.hs. but if filelength/tell cannot be found
through HsBase.h, i don't know what to do. at least,
System.Posix.Internals does the same:

#include "ghcconfig.h"
#include "HsBaseConfig.h"
foreign import ccall unsafe "HsBase.h read"
   c_read :: CInt -> Ptr CChar -> CSize -> IO CSsize
foreign import ccall unsafe "HsBase.h write"
   c_write :: CInt -> Ptr CChar -> CSize -> IO CSsize


it is possible that devil is in the including of those two additional
files. try to add it. otherwise, we should wait until Simon be up :)


-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]

Attachment: FD.hs
Description: Binary data

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to