I am working with the following Data Type:
data Exp a =
|Const a
|Simetrico (Exp a)
|Mais (Exp a) (Exp a)
|Menos (Exp a) (Exp a)
|Mult (Exp a) (Exp a)
but a is supposed to be a Numeric type.
I would define Eq like this:
instance Eq (Exp a) where
a == b | ... = True
| otherwise = False
but I am saying nowhere that my a is a numeric type, so ghci complains, how do I solve this ?