On Mon, 15 Apr 2002, Ross Paterson wrote:
> GHC (even without -fglasgow-exts) rejects the following:
>
> newtype Foo a = Foo a
>
> instance Eq a => Eq (Foo a) where
> Foo x == Foo y = bar
> where bar :: a
> bar = undefined
>
> It seems to treat the inner a as bound to the a in the instance header,
> and thus not universally quantified.
class Eq z where
(==) :: z -> z -> Bool
^^^^
It's complaining that the type is less polymorphic than expected, no?
I think you must be thinking of another example that irks you.
BTW, whats wrong with refering to a instanced type variable in a instance
definition? I would think it allows for more powerful expression.
Jay Cox
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs