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. Thanks Neil
Hello Neil, Friday, October 27, 2006, 7:57:54 PM, you wrote:
I was just looking into Yhc and noticed that it supports record puns,
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.
i've used it a lot in my program until i switched to ghc and was forced to rewrite all this code. if it is possible, i ill vote to add ghc support for this feature. i don't propose it for h' because current records implementation in haskell seems like somewhat temporary solution -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
Hi
i don't propose it for h' because current records implementation in haskell seems like somewhat temporary solution
It sounds like functional dependencies are also going to be temporary feature, until whatever replaces them. If anyone wants to use puns this time next year, I recommend someone proposes them for Haskell Prime - they have 2 implementations, are well established, theoretically sound and seem to have a lot more people who want them than I ever knew! Yet despite this, I never even knew they existed, and there are quite a few places I could have used them, now I know what they are. Thanks Neil
Hello,
This feature was removed from Haskell (I was never sure why).
However, I think it is a handy feature and should certainly not be
removed if it is already implemenetd.
-Iavor
On 10/27/06, Neil Mitchell
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.
Thanks
Neil _______________________________________________ Hugs-Users mailing list Hugs-Users@haskell.org http://www.haskell.org/mailman/listinfo/hugs-users
Hi
This feature was removed from Haskell (I was never sure why). However, I think it is a handy feature and should certainly not be removed if it is already implemenetd.
Does it make sense to have a feature that is available in Hugs and Yhc bug not GHC? I'd suggest that if you want this feature, you try and get it put back in for Haskell Prime. I personally have no particular feeling one way or the other about this feature - I just want to remove configuration flags from Yhc that no-one understands and move towards standard Haskell. Thanks Neil
On 10/27/06, 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.
Thanks
Neil _______________________________________________ Hugs-Users mailing list Hugs-Users@haskell.org http://www.haskell.org/mailman/listinfo/hugs-users
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.
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@haskell.org http://www.haskell.org/mailman/listinfo/hugs-users
| 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. I always thought it was a mistake to remove record puns in H98. I would not be against re-introducing them into GHC, since they appear to remain in Hugs and are in Yhc. Simon
participants (6)
-
Bulat Ziganshin -
Gregory Wright -
Iavor Diatchki -
Neil Mitchell -
Ross Paterson -
Simon Peyton-Jones