Arrows extentions and ArrowApplicable

Arrows syntax supports Arrow, ArrowChoice(if, case etc.) and ArrowLoop(rec) - but not ArrowApplicable. Therefore it is not possible to write: proc x -> do a <- someArrow -< x a -< x but proc x -> do a <- someArrow -< x app -< (a, x) and proc x -> do a <- someArrow -< x app -< (otherArrow a, x) instead of proc x -> do a <- someArrow -< x otherArrow a -< x Such approach adds some syntax sugar but without adding any additional keyword and IMHO it can simplify writing ArrowApply (especially Kleisli IO). Regards

On Fri, Aug 28, 2009 at 02:33:08PM +0200, Maciej Piechotka wrote:
Arrows syntax supports Arrow, ArrowChoice(if, case etc.) and ArrowLoop(rec) - but not ArrowApplicable. Therefore it is not possible to write:
proc x -> do a <- someArrow -< x a -< x
You can write proc x -> do a <- someArrow -< x a -<< x (See the Arrow notation section of the GHC User's Guide.)
participants (2)
-
Maciej Piechotka
-
Ross Paterson