"Everything which is both an X and a Y is also a Z, and some other
 things are Zs too."

Hi.

This is not valid Haskell:

    import Random
    instance (Bounded a, Enum a) => Random a where ...

because the class (Random) is applied directly to a type variable.

But, every type in (Bounded, Enum) has a potential instance of Random,
using no properties of the type except its Bounded and Enum functions.

Is there a deep reason for not allowing the above form of instance
declaration?

Regards,
Tom

Reply via email to