[Haskell-cafe] Re: Parsec and network data

brian brianchina60221 at gmail.com
Wed Aug 27 12:26:30 EDT 2008

I made a small example related to the problem: http://hpaste.org/9957

It's my attempt to run data from the network directly into Parsec
without having to fear deadlock due to blocking. The idea is that we
feed Parsec from a timeout-enabled Stream based on Handle. As long as
Parsec is able to read the data it wants reasonably quickly,
everything is OK. If the remote host stops sending data, we don't
hang; we just treat it as a parse error.

But the code demonstrates a problem. Why is it doing that? How to fix
it? Thanks.

More information about the Haskell-Cafe mailing list