Re: StricterLabelledFieldSyntax

2009-08-03 Thread Simon Marlow
carefully before introducing any. Cheers, Simon Simon | -Original Message- | From: haskell-prime-boun...@haskell.org [mailto:haskell-prime- | boun...@haskell.org] On Behalf Of Ian Lynagh | Sent: 26 July 2009 21:53 | To: haskell-prime@haskell.org | Subject: Re

RE: StricterLabelledFieldSyntax

2009-08-01 Thread Simon Peyton-Jones
change. Simon | -Original Message- | From: haskell-prime-boun...@haskell.org [mailto:haskell-prime- | boun...@haskell.org] On Behalf Of Ian Lynagh | Sent: 26 July 2009 21:53 | To: haskell-prime@haskell.org | Subject: Re: StricterLabelledFieldSyntax | | On Sun, Jul 26, 2009 at 10:16:28PM +0300

RE: StricterLabelledFieldSyntax

2009-07-27 Thread Sittampalam, Ganesh
Ian Lynagh wrote: Hi all, I've made a ticket and proposal page for making the labelled field syntax stricter, e.g. making this illegal: data A = A {x :: Int} y :: Maybe A y = Just A {x = 5} +1: The precedence here is an ugly wart. It's particularly annoying when teaching

Re: StricterLabelledFieldSyntax

2009-07-27 Thread Jon Fairbairn
Neil Mitchell ndmitch...@gmail.com writes: Hi Would it be proper to create a counterproposal for this syntax? ReversedLabelledFieldSyntax? I would claim that, of the existing Haskell code, StricterLabelledFieldSyntax only rejects unclear (bad) code, and requiring it be changed (to be made

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Jon Fairbairn
Ian Lynagh ig...@earth.li writes: http://hackage.haskell.org/trac/haskell-prime/wiki/StricterLabelledFieldSyntax I approve of the principle -- the binding level is confusing, but I would far rather make a bigger change, so that rather than being confusable with the binding level of function

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Ian Lynagh
On Sat, Jul 25, 2009 at 09:45:18PM -0400, Isaac Dupree wrote: Ian Lynagh wrote: Hi all, I've made a ticket and proposal page for making the labelled field syntax stricter, e.g. making this illegal: data A = A {x :: Int} y :: Maybe A y = Just A {x = 5} and requiring this

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Ian Lynagh
On Sun, Jul 26, 2009 at 09:40:40AM +0200, Sean Leather wrote: I've made a ticket and proposal page for making the labelled field syntax stricter I'm definitely in favor of this change. I only have an issue with calling it stricter. Maybe it's just me, but strictness doesn't provoke the

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Sean Leather
On Sun, Jul 26, 2009 at 13:41, Ian Lynagh wrote: On Sun, Jul 26, 2009 at 09:40:40AM +0200, Sean Leather wrote: I've made a ticket and proposal page for making the labelled field syntax stricter I'm definitely in favor of this change. I only have an issue with calling it stricter.

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Ian Lynagh
On Sun, Jul 26, 2009 at 03:46:41PM +0200, Sean Leather wrote: On Sun, Jul 26, 2009 at 13:41, Ian Lynagh wrote: Would it be useful to add an example with the appropriate parentheses? I'm not sure I understand what sort of an example you want. Isn't Just (A {x = 5}) one? I think

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Neil Mitchell
Hi Would it be proper to create a counterproposal for this syntax? ReversedLabelledFieldSyntax? I would claim that, of the existing Haskell code, StricterLabelledFieldSyntax only rejects unclear (bad) code, and requiring it be changed (to be made clearer) is a good thing. I haven't seen

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Ian Lynagh
On Sun, Jul 26, 2009 at 03:24:03PM +0100, Neil Mitchell wrote: I haven't seen anyone else claim to use the current more liberal syntax for fields, but I know that I do rather extensively. I would consider: Just A {a = 1} To be confusing, but if you simply omit the space: Just A{a =

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Neil Mitchell
I haven't seen anyone else claim to use the current more liberal syntax for fields, but I know that I do rather extensively. I would consider: Just A {a = 1} To be confusing, but if you simply omit the space: Just A{a = 1} I now find that perfectly clear and unambiguous. I did

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Isaac Dupree
Jon Fairbairn wrote: Ian Lynagh ig...@earth.li writes: http://hackage.haskell.org/trac/haskell-prime/wiki/StricterLabelledFieldSyntax I approve of the principle -- the binding level is confusing, but I would far rather make a bigger change, so that rather than being confusable with the

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Isaac Dupree
Sean Leather wrote: To me, the syntax is not actually stricter, just that the precedence for labeled field construction, update, pattern is lower. What is the effective new precedence with this change? Previously, it was 11 (or simply higher than 10). Is it now equivalent to function

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Iavor Diatchki
Hello, I am strongly against this change. The record notation works just fine and has been doing so for a long time. The notation is really not that confusing and, given how records work in Haskell, makes perfect sense (and the notation has nothing to do with the precedence of application

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Isaac Dupree
Iavor Diatchki wrote: Hello, I am strongly against this change. The record notation works just fine and has been doing so for a long time. The notation is really not that confusing and, given how records work in Haskell, makes perfect sense (and the notation has nothing to do with the

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Iavor Diatchki
Hello, On Sun, Jul 26, 2009 at 10:01 PM, Isaac Dupreem...@isaac.cedarswampstudios.org wrote: Iavor Diatchki wrote: Hello, I am strongly against this change.  The record notation works just fine and has been doing so for a long time.  The notation is really not that confusing and, given how

Re: StricterLabelledFieldSyntax

2009-07-26 Thread Ian Lynagh
On Sun, Jul 26, 2009 at 10:16:28PM +0300, Iavor Diatchki wrote: On Sun, Jul 26, 2009 at 10:01 PM, Isaac Dupreem...@isaac.cedarswampstudios.org wrote: Iavor Diatchki wrote: I am strongly against this change.  The record notation works just fine and has been doing so for a long time.