[Haskell-cafe] Screen scraping with an interactive process: Buffering problems?

Denis Bueno dbueno at gmail.com
Wed Nov 7 08:12:41 EST 2007


On Nov 6, 2007 10:15 PM, David Benbennick <dbenbenn at gmail.com> wrote:
> What about using hGetContents to just read ALL of the input, as a lazy
> string?  Then you look through that string for success or failure.  In
> other words,
>
> readACL2Answer pout = do
>     s <- hGetContents pout
>     parse s here

Ironically, this was my first problem.  First of all, I don't think I
want the semi-closed state -- I want to be able to read and write
freely later on (I may be misunderstanding semi-closed, however).
Second, when I used this approach, after the hGetContents call I did
the regexp matching, and the program hung during matching.

-- 
                              Denis


More information about the Haskell-Cafe mailing list