Posix library ,Concurrent Haskell and Haskell IO sub-system
Volker Stolz
stolz@i2.informatik.rwth-aachen.de
Thu, 10 Jul 2003 13:37:40 +0200
In local.glasgow-haskell-users, you wrote:
> I use the Posix library since I have to communicate via a pipe with
> another UNIX process.
>
> Therefore I have to use
> fdRead :: Fd -> ByteCount -> IO (String,ByteCount)
Why do you "have to" use an Fd? A regular handle should be sufficient.
Where do you get the Fd from? Did you consider lifting the Fd back
to a Handle? If you really need to read exactly ByteCount bytes, you could
go the hard way and set the handle to unbuffered IO and call hGetChar
n times.
--
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
rage against the finite state machine