I'm looking at iteratee as a way to replace my erroneous and really
inefficient lazy-IO-based backend for an expect like Monad DSL I've been
working for about 6 months or so now on and off.

The problem is I want something like:

expect "some String"
send "some response"

to block or perhaps timeout, depending on the environment, looking for "some
String" on an input Handle, and it appears that iteratee works in a very
fixed block size.  While a fixed block size is ok, if I can put back unused
bytes into the enumerator somehow (I may need to put a LOT back in some
cases, but in the common case I will not need to put any back as most
expect-like scripts typically catch the last few bytes of data sent before
the peer is blocked waiting for a response...)

Otherwise, I'm going to want to roll my own iteratee style library where I
have to say "NotDone howMuchMoreIThinkINeed" so I don't over consume the
input stream.

Does that even make any sense?  I'm kind of brainstorming in this email
unfortunately :-)

Dave
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to