Niner since 2009
I loaded an haskell file with following code on hugs:
double x = x + xquad x = double (double x)quadrup = double . double
If I try "quad 1.01" (without quotes), the correct result of 4.04 is returned but if I try "quadrup 1.01" (without quotes) hugs returns following error message.
ERROR - Cannot infer instance
*** Instance : Fractional Integer
*** Expression : quadrup 1.01
Hugs returns the following types for quad and quadrup.
Main> :type quadquad :: Num a => a -> aMain> :type quadrupquadrup :: Integer -> Integer
Why does quadrup end up with type of Integer -> Integer instead of "Num a => a -> a" ?