我已经定义了自己的运算符:
infixr 6 >+
x >+ y = (+ x) y
它是右联想。
现在我想在下一个表达式中使用:
(`mod` 14) (>+ 5) 10
但我收到一个错误:
<interactive>:11:1:
Non type-variable argument in the constraint: Integral (a -> a)
(Use FlexibleContexts to permit this)
When checking that ‘it’ has the inferred type
it :: forall a. (Integral (a -> a), Num a) => a
我该如何解决?