On Mon, Aug 23, 2010 at 1:06 AM, Heinrich Apfelmus <apfel...@quantentunnel.de> wrote: > Conal Elliott wrote: >> >> For anyone interested in iteratees (etc) and not yet on the iteratees >> mailing list. >> >> I'm asking about what iteratees *mean* (denote), independent of the >> various >> implementations. My original note (also at the end below): > > In my world view, iteratees are just a monad M with a single operation > > symbol :: M Char > > that reads the next symbol from an input stream.
So perhaps this could be a reasonable semantics? Iteratee a = [Char] -> Maybe (a, [Char]) = MaybeT (State [Char]) a symbol [] = Nothing symbol (c:cs) = Just (c, cs) I'm not experienced with iteratees. Does this miss something? Luke _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe