On Sat, Mar 8, 2008 at 12:56 AM, Johan Tibell <[EMAIL PROTECTED]> wrote:
>  The problem -- maybe there are others too -- is that when a parser such as
>
>  many (byte 65)
>
>  is run it will always return a 'Partial' result waiting for more input
>  even though the enumerator is exhausted. In other words, there's no
>  way to detect end of input.

It appears that you need some way to distinguish the end of input
from, "that's all I have for now". You could use an empty Bytestring
in S if you were careful that you maintained that, in normal
processing, such a state doesn't arise. Otherwise, have a Maybe in
your state and set it to Nothing when the input is exhausted. Then
have combinators, like many, handle the EOF case sensibly.


AGL


-- 
Adam Langley [EMAIL PROTECTED] http://www.imperialviolet.org
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to