
19 May
2008
19 May
'08
2:11 a.m.
On Mon, May 19, 2008 at 2:02 AM, john lask
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