record matching syntax forensics

so I noticed DrIFT was generating code like f Foo{bar} = ... as seemingly a shorthand for f Foo{bar = bar} = ... which does not seem to work with current compilers. I fixed this in 2.0.2 but was curious why it was generating code like that in the first place. it appears to be illegal looking at the haskell report and I was uncertain who wrote the derive rules in the first place so thought I would ask here. John -- --------------------------------------------------------------------------- John Meacham - California Institute of Technology, Alum. - john@foo.net ---------------------------------------------------------------------------

Google for 'punning'. It was removed from Haskell (I don't know why -- look at the list archives). But that used to be legal. On Thu, 13 Nov 2003, John Meacham wrote:
so I noticed DrIFT was generating code like
f Foo{bar} = ... as seemingly a shorthand for f Foo{bar = bar} = ...
which does not seem to work with current compilers. I fixed this in 2.0.2 but was curious why it was generating code like that in the first place. it appears to be illegal looking at the haskell report and I was uncertain who wrote the derive rules in the first place so thought I would ask here. John
-- Hal Daume III | hdaume@isi.edu "Arrest this man, he talks in maths." | www.isi.edu/~hdaume
participants (2)
-
Hal Daume III
-
John Meacham