Arrows (was Re: Proposal: Applicative => Monad: Call for consensus)
Ross Paterson
ross at soi.city.ac.uk
Thu Jan 6 12:31:07 CET 2011
On Wed, Jan 05, 2011 at 12:10:36PM -0500, Tyson Whitehead wrote:
> I wonder if Patai hit upon the root of the issue when in his blog (which
> includes a nice hierarchy diagram) he suggested/proposed that "Arrow is
> strictly the intersection of Applicative and Category".
>
> http://just-bottom.blogspot.com/2010/04/programming-with-effects-story-so-far.html
I don't think that's quite true. Category(~>) + forall a. Applicative(a~>)
gives you the arrow constants, but not the arrow laws, without some additional
conditions relating the two, like
fmap f (g >>> h) = g >>> fmap f h
liftA2 (,) id id = arr (\x -> (x,x))
liftA2 const f id = f
arr f >>> g &&& h = (arr f >>> g) &&& (arr f >>> h)
first f >>> first g = first (f >>> g)
More information about the Libraries
mailing list