Re: A newbie question about Arrows.

2003-01-13 Thread Magnus Carlsson
Shawn P. Garbett writes: ... > Or in a routing diagram > > In >- SP1 --> SP2 --> Out > > But what if you wanted to mix up the routing of Left and Right from > the Either above? > > In(Left) -> SP1(Left) > In(Right) -> SP2(Right) > SP1(Right) -> SP2(Left) > SP2(Left) -> SP1(Right) >

Re: A newbie question about Arrows.

2003-01-10 Thread Ross Paterson
On Thu, Jan 09, 2003 at 10:30:45AM -0600, Shawn P. Garbett wrote: > On Monday 06 January 2003 04:02 am, Nicolas Oury wrote: > > I think for example to event-driven arrows : we could make a pair of > > inputs without mixing the "event happened" information. > > Here's one that's been baffling me: W

Re: A newbie question about Arrows.

2003-01-09 Thread Shawn P. Garbett
On Monday 06 January 2003 04:02 am, Nicolas Oury wrote: > I think for example to event-driven arrows : we could make a pair of > inputs without mixing the "event happened" information. Here's one that's been baffling me: What about the case where you have two arrows you want to combine. Suppose t

Re: A newbie question about Arrows.

2003-01-08 Thread Ashley Yakeley
In article <[EMAIL PROTECTED]>, Ross Paterson <[EMAIL PROTECTED]> wrote: > The arrow notation is closely tied to products. Perhaps, but it doesn't have to be part of the class. I prefer this, for aesthetic reasons: class Arrow a where arr :: (b -> c) -> a b c (>>>) :: a b c -> a c

Re: A newbie question about Arrows.

2003-01-07 Thread Ross Paterson
On Tue, Jan 07, 2003 at 06:22:53PM +0100, Nicolas.Oury wrote: > I may be totally wrong, but I read in Hughes paper than in Stream > Processors, Either is "more a product" than (,) . It could be interesting > to parameter the arrow by product, in order than the multiplexing is done > using this prod

Re: A newbie question about Arrows.

2003-01-07 Thread Nicolas.Oury
I may be totally wrong, but I read in Hughes paper than in Stream Processors, Either is "more a product" than (,) . It could be interesting to parameter the arrow by product, in order than the multiplexing is done using this product when using the new notation for arrow. Best regards, Nicolas Our

Re: A newbie question about Arrows.

2003-01-06 Thread Ashley Yakeley
At 2003-01-06 03:14, Ross Paterson wrote: >class PreArrow ar where > arr :: (a -> b) -> ar a b > (>>>) :: ar a b -> ar b c -> ar a c ... > class (PreArrow ar, Monoidal p u) => GenArrow ar p u where > first :: ar a b -> ar (p a c) (p b c) My own preference is someth

Re: A newbie question about Arrows.

2003-01-06 Thread Ross Paterson
On Mon, Jan 06, 2003 at 11:02:32AM +0100, Nicolas Oury wrote: > * Why is made the choice to use (,) as Cartesian in first? It's certainly possible to define a more general interface, and the theoretical work does. However the arrow interface is already very general, and the question is whether an

A newbie question about Arrows.

2003-01-06 Thread Nicolas Oury
Hello, I read some of the material about Arrows on www.haskell.org/arrows and I have some questions : * Why is made the choice to use (,) as Cartesian in first? Can't we write something like : class Cartesian p where pair :: a -> b -> (p a b) projLeft :: (p a b) -> a projRight :