On Mon, May 19, 2008 at 2:02 AM, john lask <[EMAIL PROTECTED]> wrote:
> Consider the data type:
>
> Foo i o a = ...
>
> we want to declare an instance of Monad and Arrow for Foo without using a
> newtype (repackaging).
> The effect we want is to be able to construct an expression like:
>
> ( f>> g )>>> ( h>> i )
>
> where f, g, h, i :: Foo i o a, for some i o a
[...]
> Can Foo be declared an instance of both Arrow and Monad ?
I think not. However, it's not unreasonable for
data Foo i o
To be both monad and arrow, since arrows are functors in their second argument.
Luke
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe