Re:GHC 7.6 is now live: poly kinds, dynamic use of cores, nu...
by evmar on Friday September 07, 2012 @01:53PM
(#4490311)
In my experience it was a perpetual pain point. Do you namespace all your field names with a common prefix based on the outer type name? Or do you just get lucky and not have the names collide?
[ Parent
| on HN ]
Re:GHC 7.6 is now live: poly kinds, dynamic use of cores, nu...
by hesselink on Friday September 07, 2012 @03:42PM
(#4490822)
In the past most people prefixed their field names with the type name. Nowadays, the most common thing is to put types in their own module, and use the module system to sort out any conflict. Qualified imports can add a prefix, but you can also import parts unqualified, or hide one problematic field.
Re:GHC 7.6 is now live: poly kinds, dynamic use of cores, nu...
by mifrai on Saturday September 08, 2012 @06:12AM
(#4492696)
While I prefer the module solution, it's not always possible when you have mutually recursive record definitions. Well, technically it is possible - but it's very unpleasant [1].
[1] http://www.haskell.org/ghc/docs/latest/html/users_guide/sepa...