I want to be able to create a function to see if two types are equal. I have a type class called finite defined as follows,
class (Bounded a, Enum a) => Finite a
and want to be able to write a equality comparison function
equals :: (Finite a, Eq b) => (a -> b) -> (a -> b) -> Bool
for functions who's domain is of type Finite. For example, for a negation function:
neg :: Int8 -> Int8
neg n = -n
the return in the Main would be:
*Main> equals neg (\x -> x)
False