Douglas Philips wrote:
On 2007 Feb 3, at 2:55 AM, Brian Hulley indited:
I know, I find the need to manually delete and insert commas
extremely tedious as well. This is why I proposed:
...
I like that. (I haven't done enough analysis on the layout part of
the grammar to personally make su
Douglas Philips wrote:
On 2007 Feb 2, at 11:25 PM, Brian Hulley indited:
Apart from the extra possibility for errors (yes I understood that
you'd define it to not be an error but this doesn't change the fact
that for people who always wrote their tuples using the normal
mathematical
Douglas Philips wrote:
On 2007 Feb 2, at 1:03 PM, Neil Mitchell indited:
Personally I'd make the rule that trailing commas are never allowed,
anywhere, but I do see an argument for adding them to import lists.
You just highlighted the inconsistency:
You refer to "import lists"... you appear to
Douglas Philips wrote:
What would be the proper way to propose that:
( exp1 , ... , expk ) (tuple, k>=2)
[ exp1 , ... , expk ] (list, k>=1)
be amended to:
( exp1 , ... , expk [ , ] ) (tuple, k>=2)
[ exp1 , ... , expk [ , ] ] (list, k>=1)
I think a problem with the above proposal is that by a
Taral wrote:
On 1/31/07, Conor McBride <[EMAIL PROTECTED]> wrote:
So, as far as Haskell' is concerned, I'd favour forbidding non-empty
cases, but only because I favour having some more explicit syntax for
empty cases, further down the line.
I see nothing wrong with "case x of {}", with require
Andres Loeh wrote:
The only reasons that I could see in favor of allowing empty
"forall"s is that it might be easier to automatically generate
code. Haskell seems to be a bit inconsistent in how it treats empty
constructs. For example, empty let and empty where seems to be
allowed, but not an emp
Claus Reinke wrote:
mapA f (nilAP -> ()) = nilA
mapA f (consAP -> (h,t)) = consA (f h) (mapA f t)
foldA f n (nilAP -> ())= n
foldA f n (consAP -> (h,t)) = f h (foldA f n t)
To me this exactly illustrates why view patterns are a bad idea: you've
taken some concrete type,
On Wednesday, January 24, 2007 10:02 AM, Dinko Tenev wrote:
On 1/24/07, Brian Hulley <[EMAIL PROTECTED]> wrote:
A possible syntax could represent the
value being matched explicitly, say using ? to represent the value
currently
being matched, then the pattern could be written as an eq
Simon Peyton-Jones wrote:
http://hackage.haskell.org/trac/haskell-prime/wiki/ViewPatterns
I'm thinking of implementing it in GHC, so I'd be interested in
feedback of the form
- how desirable is it to have a feature of this general form?
- can this particular proposal be improved