0
対変数とGHCiの中の関数を呼び出すときに、私は数の絶対値を見つけるために、簡単な関数を定義した:異なる振る舞いリテラル数
変数Prelude> let x = -10
Prelude|
Prelude> abs x
10
通話で関数を呼び出す
let abs n | n >= 0 = n | otherwise = -n
値を持つ関数
Prelude> abs -10
<interactive>:65:1:
Non type-variable argument in the constraint: Num (a -> a)
(Use FlexibleContexts to permit this)
When checking that ‘it’ has the inferred type
it :: forall a. (Num a, Num (a -> a), Ord a) => a -> a
私は2番目の呼び出しの失敗を理解していませんation。私はGHCiバージョン7.10.2を使用しています。
より正確でより正確なタイトルを書いてください。 –