Hi Chris
What does the Stream class *do* though?
class Stream a b c d where
(->>) :: a -> (b -> c) -> d
Even with Neil's change its still quite unusual:
class Stream a b c where
(->>) :: a -> (b -> c) -> c
In the first formulation there is an input of type a, a function (b ->
c) and a result of a completely different type d.
In Neil's class the function relates to the type of the answer but not
to the input.
The "difficult" type classes in Haskell - Applicative, Monad, and
Arrows / Category - are related to some degree to fairly standard
combinators on functions. But they generalize the combinators to
operate on other types than the function type (->). As there isn't a
relation between input and output, I don't quite see how the Stream
type could start as a combinator.
Best wishes
Stephen
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe