[Haskell-cafe] Re: [Haskell] Re: Streams: the extensible I/O library

Bulat Ziganshin bulatz at HotPOP.com
Tue Feb 7 03:46:41 EST 2006


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:bulatz at HotPOP.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FD.hs
Type: application/octet-stream
Size: 8576 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060207/3d30c226/FD.obj


More information about the Haskell-Cafe mailing list