Re: [Haskell-cafe] Re: Stream processors

Okay, maybe I misunderstood, I thought by stream processors you meant functions of the type: process :: [a] -> [a] where both the input and the output are lazy lists (streams) I would assume if you want to have a stateful filter you need to maintain the state by using either: process :: [a] -> IO [a] process :: <state> -> [a] -> [a] process :: [a] -> ST s [a] Keean.

K P SCHUPKE writes:
Okay, maybe I misunderstood, I thought by stream processors you meant functions of the type:
process :: [a] -> [a]
No, my stream processors currently have the API I described in my initial posting. What I was wondering is whether there is a more general API that I could use to unify all kinds of stream processors into a class of data types which my IO driver can use without having to know what it is. The StreamProc data type I defined does that, but I suspect that there is something more fundamental definition than what I've come up with. Peter
participants (2)
-
MR K P SCHUPKE
-
Peter Simons