On 6/27/10 21:52, Victor Nazarov wrote:
>> class Sizeable sizeable
>>    where type Sizeof sizeable
>>          sizeof :: Sizeof sizeable

This is where the type checker should complain. There is no valid way to call sizeof, regardless of what instances are available.

The situation is similar to this:

> class C a where x :: Int

In which case the compiler says:

>     The class method `x'
>     mentions none of the type variables of the class C a
>     When checking the class method: x :: Int
>     In the class declaration for `C'

I thought there was already a trac ticket for this, but I can't find it right now.

Martijn.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to