Hi there,
With ghc-2.04 I can successfully compile the following:
> module Buggy( buggy ) where
> data L a = L [a]
> class (Eq a,Ord a,Num a,Read a,Show a) => Class a where
> method :: a -> Bool
> instance (Class a) => Class (L a) where
> method (L as) = True
> instance (Class a) => Eq (L a) where
> (==) e1 e2 = True
> instance (Class a) => Ord (L a) where
> compare a b = EQ
> instance (Class a) => Num (L a) where
> negate p = p
> instance (Class a) => Show (L a) where
> showsPrec _ _ c = c
> instance (Class a) => Read (L a) where
> readsPrec _ _ = [(L [],[])]
> buggy :: (Class a) => (L a) -> (L a)
> buggy omega
> = g omega 1
> g :: (Class a) => (L a) -> a -> (L a)
> g omega one
> = omega
I had expected an overloading error because of the use of ``1''
in the definition for ``buggy''.
Hope this helps.
Regards,
Marc van Dongen