[Haskell] Re: (small) records proposal for Haskell '06

Stefan Monnier monnier at iro.umontreal.ca
Thu Jan 5 16:16:38 EST 2006


> This change "solves" the problem that different records in a single
> namespace cannot share field names in a simple manner.

As mentioned elsewhere, you'd also need to remove the functional update
feature to fix this namespace problem.

> In order to allow the writing of records code with is both valid Haskell
> 98 and valid Haskell '06, I'd suggest a pragma that causes the Haskell '06
> compiler to generate the accessor functions.

I think it'd also be good to make it possible to "derive" the accessors,
using the usual deriving(...) syntax.  Which would be like turning on the
pragma but at the granularity of a single datatype (or maybe even a single
field).


        Stefan





More information about the Haskell mailing list