
10 Apr
2012
10 Apr
'12
3:57 p.m.
Hello. Given the following function definitions f 0 = True g False = True ghc infers the following types for the functions: f :: (Eq a, Num a) => a -> Bool g :: Bool -> Bool Why f has "Eq a" in the context in ts type, and g does not? As both are defined using a constant pattern, I expected none of them should require the type of the argument to be instance of Eq. Romildo