> Punning was removed from Haskell some while ago,
> I believe when Haskell 98 was fixed in Feb 1999.
Indeed. However, due to popular demand, the feature was retained as
an extension in Hugs (turn on with the -98 option) and nhc98 (turn
on/off with the -puns/-nopuns options).
R
Punning was removed from Haskell some while ago,
I believe when Haskell 98 was fixed in Feb 1999.
See the Preface section 0.4.1
Simon
| -Original Message-
| From: Iavor S. Diatchki [mailto:[EMAIL PROTECTED]]
| Sent: 26 December 2001 18:55
| To: [EMAIL PROTECTED]
| Subject: punning in
hi there,
i just discovered that GHC does not support punning with the -fglasgow-exts
option. is there another flag to turn this on or has it been completely
removed? if so could we have it back - i really like the feature (in
patterns anyways) and use it (hugs -98 supports it). i don
George Russell wrote:Standard ML, I'm glad to
> say, has punning, and I don't remember it causing me any difficulties at
> all as a programmer or a compiler writer. (I wrote the parser in the
> latest version of MLj.) Please reverse this stupid ban in the next version
> o
Hi George,
I believe that punning was taken out of Haskell 98 because of some (IMO,
mistaken) concerns about renaming. If memory serves me, somebody
had complained that punning `broke alpha-renaming'. For example, you
can't treat (\x -> C{x}) as being equivalent to (\y -> C{y
Is there any chance that someone could send to me in Germany the head of the
canting Puritan who outlawed punning in Haskell 98? I'm trying to migrate
some code which makes heavy use of punning, and I'm about to yet again
(for literally the thirtieth time) fix yet another (subtly
Tommy Thorn wrote:
>
> Koen Claessen:
> > This brings us to another issue. Doesn't the following definition look
> > a bit awkward?
> >
> > R{ x = x }
>
> Definitely wierd. The left and right-hand side denotes two different
> things, which AFAIK is the only place where `=' behaves like this.
Koen Claessen:
> This brings us to another issue. Doesn't the following definition look
> a bit awkward?
>
> R{ x = x }
Definitely wierd. The left and right-hand side denotes two different
things, which AFAIK is the only place where `=' behaves like this.
Wouldn't `<-' have been a better cho
| > * R{x} constructs a record, and is equivalent to R{x=x}
| > * r{x} updates the x field of record r, and is equivalent to r{x=x}
| > * R{x} can be used as a pattern; its meaning is not defined by the
| > report, but is presumably supposed to be the same as R{x=x}
This brings us to anoth
John Hughes wrote on the Std Haskell board:
> `Punning' can be used in three places in Haskell. Suppose a record
> type is defined by
>
> data R = R{x :: Int}
>
> Then
> * R{x} constructs a record, and is equivalent to R{x=x}
> * r{x} updates the x field o
10 matches
Mail list logo