On 22/04/2012, AntC <[email protected]> wrote:
> Matthew Farkas-Dyck <strake888 <at> gmail.com> writes:
>
>> I made another proposal for records in Haskell, meant to solve just
>> the namespace problem, and no more.
>> http://hackage.haskell.org/trac/ghc/wiki/Records/ExplicitClassyRecords
>>
>
> Thanks Matthew, I'm finding your wiki too sketchy to follow.
>
> What name(s) does your proposal generate? And what type(s) do they have?
Ahh, this is partly the beauty of it — it generates no names. All
names are user-declared. The system generates only instances.
> For record access, how does the compiler resolve to the right definition or
> instance from the context of use?
Just as it would any other. It's simply a type class.
> It seems you aren't making any proposal about record updating. So the acid
> test is how do you expect this to be treated:
> e{ x = True }
> {* `e` is some arbitrary expression, possibly denoting a record type;
> `x` one of those names for which you've solved the namespace problem
> *}
Ah, sorry; I added this to the wiki.
Cheers,
strake
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users