Quoth Johannes Waldmann <[EMAIL PROTECTED]>: ... | I think the following is analoguous. | | Imagine you're writing a parser for a simple programming language. | A program is a sequence of statements. | Fine, you do "readFile" (once) and then apply a pure Parsec parser. | | Then you decide to include "import" statements in your language. | Suddenly the parser needs to do IO. Assume the import statements | need not be the first statements of the program | (there may be headers, comments etc. before). | Then you really have to interweave the parsing and the IO.
I think "readFile" might be where the analogy fails. In a network client like we were talking about, it's understood that you have to interweave the parsing and I/O, to some extent. From this point of view, I don't see a problem with this programming language parser, in fact I suppose I might indeed do it that way - maybe map the file to a ByteString or something, would have to think about it. Donn Cave, [EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe