"Simon Marlow" <[EMAIL PROTECTED]> writes:
> To really match the C program, you need to use IOExts.hGetBuf and
> IOExts.hPutBuf, and do the operations on raw characters in memory.
> Using a UArray of Word8 would be better, but there aren't any
> operations to do IO to/from a UArray yet (actually I've written
> these, but they aren't in the tree yet).

So why don't getContents / putStr / etc. deforest cleanly to calls to
hGetBuf and hPutBuf?  I'm genuinely curious; my own experience in this
direction is "The engineering is challenging".  These functions are so
commonly used, though---and they're vastly easier to use, actually
portable, etc.  The effort would surely be repaid.

Plus, I'm curious to hear about any challenges which may be involved
in pulling this off. :-)  If it's genuinely tricky, the tricks are
likely to be generally useful for other stream-ish things.

-Jan-Willem Maessen
Eager Haskell Project
[EMAIL PROTECTED]

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to