On 25/05/11 10:00, Jonas Almström Duregård wrote:
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
Here's a (tongue-in-cheek) trick that allows for layout close to
On Thursday 26 May 2011 14:35:41, Neil Brown wrote:
foo is the function we want to apply, and eg shows how to apply it in
do-notation with an argument on each line. I couldn't manage to remove
the r$ at the beginning of each line, which rather ruins the whole
scheme :-( On the plus side,
That's a useful operator! Unfortunately it does not play nice with $. Of
less importance: some syntactic constructs can not appear in the arguments
without parenthesis, let bindings for instance (although lambda abstraction
works parenthesis-free).
Also I'm not sure this can be used for defining
On Thursday 26 May 2011 17:22:10, Jonas Almström Duregård wrote:
Unfortunately it does not play nice with $.
Yes.
Also I'm not sure this can be used for defining trees or nested function
application since a nesting of the operator inevitably require
parenthesis.
It can't be nested, like ($)
2011/5/26 Daniel Fischer daniel.is.fisc...@googlemail.com
As far as I'm concerned, a left-associative version of ($) would sometimes
be nice (on the other hand, right-associativity of ($) is sometimes also
nice), but usually, I don't find parentheses too obnoxious.
I have a whole set of
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
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se
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}
Sounds like idiom brackets to me.
___
Haskell-Cafe mailing
I don't see the similarity (from reading this:
http://www.haskell.org/haskellwiki/Idiom_brackets). My suggestion is
just a way of using layout to avoid parenthesis.
/J
2011/5/25 Brandon Allbery allber...@gmail.com:
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se
Would it be
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se
I don't see the similarity (from reading this:
http://www.haskell.org/haskellwiki/Idiom_brackets). My suggestion is
just a way of using layout to avoid parenthesis.
This is exactly the applicative style, where idiom brackets come
Hi Alexander,
This is exactly the applicative style, where idiom brackets come from.
I disagree. Layout has at least two advantages over applicative here:
1) Applicative costs (at least) three additional characters per function
parameter.
2) You can not have arbitrary infix operators in the
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se
Hi Alexander,
This is exactly the applicative style, where idiom brackets come from.
I disagree. Layout has at least two advantages over applicative here:
1) Applicative costs (at least) three additional characters per function
11 matches
Mail list logo