Hi there,
I can't see why the following will not compile with 3.02
> module Main( main ) where
> data A a = A (a,a)
> instance (Show a,Ord a) => Num (a,a) where
> (+) a a' = a
> instance (Show a,Ord a) => Eq (A a) where
> (==) a a' = True
> instance Show (A String) where
> showsPrec p a ss = []
> instance (Show a,Ord a) => Show (A a) where
> showsPrec p a ss = []
> instance (Show a,Ord a) => Num (A a) where
> (+) a a' = a
> main = return ()
Main.lhs:18:
Could not deduce `Show (A a)'
(arising from an instance declaration at Main.lhs:18)
from the context (Show a, Ord a)
Probable cause: missing `Show (A a)' in instance declaration context
or missing instance declaration for `Show (A a)'
When checking the superclasses of an instance declaration
After removing the instance Show (A String) it will compile.
Am I missing something?
Regards,
Marc