[Haskell-cafe] Parsec and network data

Donn Cave donn at avvanta.com
Fri Aug 29 12:15:22 EDT 2008

Quoth brian <brianchina60221 at gmail.com>:

| I want to use Parsec to parse NNTP data coming to me from a handle I
| get from connectTo.

Are you still having trouble with this?

Take my opinion for what it's worth - I'm no Haskell guru - but for me,
your basic approach is unsound.  I would implement the network service
input data stream myself, with timeouts, encryption, whatever as required,
and then apply the parser to available data as a simple, pure function
that returns NNTP results and whatever data remains.  So the parser would
never see any streams or handles or anything, it would just get strings
to parse.

	Donn Cave, donn at avvanta.com

More information about the Haskell-Cafe mailing list