Re: Records in Haskell: Explicit Classy Records

2012-04-23 Thread Strake
On 22/04/2012, AntC  wrote:
> Matthew Farkas-Dyck  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
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Records in Haskell: Explicit Classy Records

2012-04-22 Thread AntC
Matthew Farkas-Dyck  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?

For record access, how does the compiler resolve to the right definition or 
instance from the context of use?

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*}

AntC





___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Records in Haskell: Explicit Classy Records

2012-04-11 Thread Matthew Farkas-Dyck
Hello GHC users.

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

In this system, record selectors are overloaded in
explicitly-user-declared type classes. Thus one can control the scope
as of any other type class.

Cheers,
strake

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users