Records in Haskell

Evan Laforge qdunkan at gmail.com
Mon Feb 27 06:27:03 CET 2012


On Sun, Feb 26, 2012 at 2:00 AM, wren ng thornton <wren at freegeek.org> wrote:
> I haven't been following all the different proposals out there, but the ones
> I did see before tuning-out all took the stance that for each given field
> either (1) this field name is unique and always clashes, or (2) this field
> name is shared and never clashes. This is problematic for a number of
> reasons. The particular reason I raised is that there are times when we
> would like for a field name to be shared, but only shared among a specified
> group of records and clashing with all other records (which may themselves
> form groups that share the name as well).

I had a proposal that, I think, wouldn't have that clash/no clash
distinction, because it doesn't have the notion of overloading a
single symbol ala typeclasses.  So I think it would sidestep that
whole problem.

Anyway, I copied it up at
http://hackage.haskell.org/trac/ghc/wiki/Records/SyntaxDirectedNameResolution
if only so I can feel like I said my thing and can stop mentioning it
:)



More information about the Glasgow-haskell-users mailing list