What is wrong with this simple type definition? (Expecting one more argument to...)
- by fluteflute
basic.hs:
areaCircle :: Floating -> Floating
areaCircle r = pi * r * r
Command:
*Main> :l basic.hs
[1 of 1] Compiling Main ( Sheet1.hs, interpreted )
Sheet1.hs:2:15:
Expecting one more argument to `Floating'
In the type signature for `areaCircle':
areaCircle :: Floating -> Floating
Failed, modules loaded: none.
I see that areaCircle :: Floating a => a -> a loads as expected. Why is the above version not acceptable?