Re: data or class inheritance

1998-06-07 Thread Fergus Henderson
On 06-Jun-1998, Josef Sveningsson <[EMAIL PROTECTED]> wrote: > The argument that the above declaration is tedios is, I think, irrelevant. > First of all; ofcourse it would be nice if the compiler could generate > everything that is possible derive but that is not always a help. Consider > c++ were

Re: data or class inheritance

1998-06-07 Thread Fergus Henderson
On 05-Jun-1998, Simon L Peyton Jones <[EMAIL PROTECTED]> wrote: > > In hbc (and soon in GHC) you can say: > > data OrganizationThing = forall a. Organisation a => MkOrg a Last time I looked (at ), hbc was using a different syntax:

Re: data or class inheritance

1998-06-06 Thread Josef Sveningsson
On Sat, 6 Jun 1998, Fergus Henderson wrote: [...] > But I think it would be nice to have better language support. > [...] > > I think you can go even ahead and declare OrganizationThing to be > a member of class Organization: > > instance Organization OrganizationThing where >

Re: data or class inheritance

1998-06-06 Thread Fergus Henderson
[Sorry if this appears twice. Our mail server hung at the exact moment I tried to send this out last night, and it doesn't appear to have made it to the list, so I'm resending it.] On 05-Jun-1998, Simon L Peyton Jones <[EMAIL PROTECTED]> wrote: > > > Why is [Yahoo,DoubleClick] illegal? > > I

Re: data or class inheritance

1998-06-05 Thread Simon L Peyton Jones
> I have a base class,Organization, with name and address functions. > I want classes Buyer and Seller from Organization. > > Now if I want to create an 2 instances of Seller > > data Yahoo = Yahoo > > instance Organization Yahoo where > > name _= "Yahoo" > > addreess = ... > > > data DoubleC