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

Gregory Wright gwright at comcast.net
Sat Oct 28 12:59:59 EDT 2006


hi Neil,

On Oct 27, 2006, at 11:57 AM, Neil Mitchell wrote:

> Hi,
>
> 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.
>

There was some discussion on the haskell' list about bring back
record puns, which were once in ghc.

Record punning would have been very helpful on one of my recent
projects, where I had some large arrays of statically initialized  
records.
The longFieldSelectorNamesToAvoidNamespaceClashes are just
noise is such a case.

Best Wishes,
Greg

> Thanks
>
> Neil
> _______________________________________________
> Hugs-Users mailing list
> Hugs-Users at haskell.org
> http://www.haskell.org/mailman/listinfo/hugs-users



More information about the Hugs-Users mailing list