[Hugs-users] Record puns, time for removal?

Ross Paterson ross at soi.city.ac.uk
Fri Oct 27 19:37:41 EDT 2006


On Fri, Oct 27, 2006 at 04:57:54PM +0100, Neil Mitchell wrote:
> I was just looking into Yhc and noticed that it supports record puns,
> for example the following code:
> 
> ------
> module Main where
> data Point = Point {x :: Int, y :: Int}
> main = print $ f $ Point 1 2
> f (Point{x}) = x
> ------
> 
> Works fine in Yhc and Hugs, but not in GHC. Is this feature
> supported/encouraged or is it depreciated and scheduled for removal? I
> am tempted to remove this feature from Yhc since it seems no one uses
> it, and GHC doesn't know about it, but was wondering what the Hugs
> plans were for it first.

It was removed in Haskell 98 (Hugs only allows it in -98 mode):

http://www.cs.chalmers.se/~rjmh/Haskell/Messages/Decision.cgi?id=372

It's probably not coming back, it's incompatible, and it's only a minor
shortcut: it might as well go.



More information about the Hugs-Users mailing list