基本.hs:
areaCircle :: Floating -> Floating
areaCircle r = pi * r * r
命令:
*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.
我看到areaCircle :: Floating a => a -> a
按预期加载。为什么上面的版本不被接受?