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 ::
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
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
> 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 -
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