[Haskell-cafe] Arrows extentions and ArrowApplicable

Maciej Piechotka uzytkownik2 at gmail.com
Fri Aug 28 08:33:08 EDT 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090828/59db3bfa/attachment.bin


More information about the Haskell-Cafe mailing list