
We were trying to make an addition function that, unlike the library one, could add numbers of different types from the typeclass 'Num.' We originally ran into a problem when trying to add (5 :: Integer) + 4.8, and were trying to define a new function that would be able to get that: (+') :: (Num a, Num b) => a -> b -> Float x +' b = d + e where d :: Float d = x e :: Float e = b This gave us the error: Couldn't match expected type `Float' against inferred type `b' `b' is a rigid type variable bound by the type signature for `pl' at test.hs:9:18 In the expression: b In the definition of `e': e = b In the definition of `pl': pl x b = d + e where d :: Float d = x e :: Float e = b Failed, modules loaded: none.