Re: PROPOSAL: Include record puns in Haskell 2011

2010-02-26 Thread Heinrich Apfelmus
Simon Marlow wrote: While I agree with these points, I was converted to record punning (actually record wildcards) when I rewrote the GHC IO library. Handle is a record with 12 or so fields, and there are literally dozens of functions that start like this: flushWriteBuffer :: Handle - IO

Re: PROPOSAL: Include record puns in Haskell 2011

2010-02-26 Thread Iavor Diatchki
Hello, In order to keep the discussion structured I have created two tickets in the haskell-prime trac system (http://hackage.haskell.org/trac/haskell-prime): * Proposal 1: Add pre-Haskell'98 style punning and record disambiguation (ticket #136) * Proposal 2: Add record-wildcards (ticket

RE: PROPOSAL: Include record puns in Haskell 2011

2010-02-25 Thread Simon Peyton-Jones
| we implicitly get | f :: T - Int | which punning shadows with | f :: Int | whereas I generally avoid shadowing completely. | | I agree with Ian. | | I tend to agree. I originally had field puns in GHC, and then took them out when Haskell 98 removed them, after a discussion very like

PROPOSAL: Include record puns in Haskell 2011

2010-02-24 Thread Iavor Diatchki
Hello, (Malcolm, sorry for the double post, I forgot to CC the list) I was thinking mostly about the old-time-y punning, where I can write a label, say theField, and it automatically gets expanded to theField = theField, in record patterns and record constructing expressions. The only corner case

Re: PROPOSAL: Include record puns in Haskell 2011

2010-02-24 Thread Martijn van Steenbergen
Ian Lynagh wrote: I have a feeling I'm in the minority, but I find record punning an ugly feature. Given data T = C { f :: Int } we implicitly get f :: T - Int which punning shadows with f :: Int whereas I generally avoid shadowing completely. I agree with Ian. Groetjes,

Re: PROPOSAL: Include record puns in Haskell 2011

2010-02-24 Thread Simon Marlow
On 24/02/10 18:23, Ian Lynagh wrote: On Tue, Feb 23, 2010 at 07:07:30PM -0800, Iavor Diatchki wrote: I'd like to propose that we add record punning to Haskell 2011. Thoughts, objections, suggestions? I have a feeling I'm in the minority, but I find record punning an ugly feature. Given