我收到了以下错误
Prelude> abs n | n>=0 = n+100 | otherwise =n
Prelude> abs 10
110
Prelude> abs -1
<interactive>:44:1: error:
* Non type-variable argument in the constraint: Num (t -> t)
(Use FlexibleContexts to permit this)
* When checking the inferred type
it :: forall t. (Ord t, Num (t -> t), Num t) => t -> t
Run Code Online (Sandbox Code Playgroud)
Ord隐式类型定义?| 归档时间: |
|
| 查看次数: |
46 次 |
| 最近记录: |