Records in Haskell 1.3

1995-09-13 Thread Simon Marlow
Hi all, I'd like to make a few comments on the proposal for simple records in Haskell 1.3. * The possibility of having polymorphic field types has been left out of the proposal. Polymorphic field types essentially bring second order polymorphism into the language, by allowing function arg

Re: Haskell 1.3 (newtype)

1995-09-13 Thread Sebastian Hunt
On Wed, 13 Sep 1995 [EMAIL PROTECTED] wrote: > Well, I'm glad to see I provoked some discussion! ... > Why should foo evaluate its argument? It sounds to me like > Lennart is right, and I should not have let Simon lead me astray! ... > This is assuming I have understood Lennart correctly, and

Re: Haskell 1.3 (newtype)

1995-09-13 Thread wadler
Well, I'm glad to see I provoked some discussion! Simon writes: Lennart writes: | So if we had | |data Age = Age !Int |foo (Age n) = (n, Age (n+1)) | | it would translate to | |foo (MakeAge n) = (n, seq MakeAge (n+1)) | | [makeAge is the "rea

Re: Haskell 1.3 (newtype)

1995-09-13 Thread Simon L Peyton Jones
Lennart writes: | So if we had | | data Age = Age !Int | foo (Age n) = (n, Age (n+1)) | | it would translate to | | foo (MakeAge n) = (n, seq MakeAge (n+1)) | | [makeAge is the "real" constructor of Age] | | Now, surely, seq does not evaluate its first argument when the |