Hi,

Would it be possible to allow this in Haskell (where <applied to> is some
new operator or keyword):

f <applied to> {x a;y b;z c}

As an equivalent to:

f (x a) (y b) (z c)

Of course my intention is that the new keyword should initiate layout syntax
so we can write this:

f <applied to>
  x a
  y b
  z c

In addition to the case where you have a big function application, this is
useful for defining trees:

Branch <applied to>
 Branch <applied to>
   Leaf
   Leaf
 Leaf

Has something like this been suggested before? Are there any disadvantages
other than a new keyword and some potential confusion for readers?
Any suggestions for a good keyword? I suppose some variant of $ makes sense,
a textual keyword like "with" would be nice but probably break a lot of
code.

Regards,
Jonas
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to