Re: what's wrong with instance C a => D a. Reply

1997-08-25 Thread Christian Sievers
I wrote: Sergey Mechveliani wrote: : As to `instance D a', : it is not a loss. Because `instance D a' is the same as : `class D a' - supplied with the default definition. For example, : the illegal declaration pair : : classC a => D a where d ::

Re: what's wrong with instance C a => D a. Reply

1997-08-22 Thread Christian Sievers
Sergey Mechveliani wrote: : As to `instance D a', : it is not a loss. Because `instance D a' is the same as : `class D a' - supplied with the default definition. For example, : the illegal declaration pair : :classC a => D a where d :: a -> a : :instan

what's wrong with instance C a => D a. Reply

1997-08-22 Thread S.D.Mechveliani
Christian Sievers <[EMAIL PROTECTED]> writes (I format the text) > The report says explicit that instance declarations like > >instance C (a,a) where ..., > > or for (Int,a) or for [[a]] > > are not allowed. I tried to understand this by thinking these > types are too c

Re: what's wrong with instance C a => D a

1997-08-22 Thread Simon L Peyton Jones
> The report says explicit that instance declarations like > instance C (a,a) where ..., or for (Int,a) or for [[a]] are not > I now only would like to know why this design decission was made, > are there any problems with the instance declarations I have in mind? You might find "Type classes -

what's wrong with instance C a => D a

1997-08-21 Thread Christian Sievers
The report says explicit that instance declarations like instance C (a,a) where ..., or for (Int,a) or for [[a]] are not allowed. I tried to understand this by thinking these types are too complex, but I had to learn that a type may also be too simple, i.e. just writinginstance D ais not