Ross Paterson <[EMAIL PROTECTED]> writes:
> Time to ditch all those dusty old monads and upgrade to arrows.
> However the point-free style of that paper won't appeal to everyone.
> I've placed a proposal for a Haskell extension with a do-notation-style
> syntax for arrows at
>
> http://www.soi.city.ac.uk/~ross/notes/ArrowsInHaskell.html
>
> Comments welcome.
I'd like to point out one thing about the implementability of your new
syntax.
Implementing the layout rule in Haskell requires a tricky dance of
passing information back and forth between the lexer and parser. One
thing that can ease the implementation is that the lexer can know when
a layout group starts, using the rule that the next token after a
'let', 'do', 'where', or 'of' (did I miss any?) starts layout, unless
it's an open brace. That is, the layout openers are all reserved
words, and are always layout openers wherever they appear.
Your syntax breaks this, since it makes '->' be a layout opener in
some but not all places it can appear.
Carl Witty
[EMAIL PROTECTED]