我有一个Haskell项目,默认使用-Werror
编译。这意味着当我运行cabal repl
时,它会开启-Werror
选项。例如,当我评估2 + 2
时,就会收到以下错误信息:
<interactive>:2:3: Warning:
Defaulting the following constraint(s) to type `Integer'
(Num a0) arising from a use of `+'
In the expression: 2 + 2
In an equation for `it': it = 2 + 2
我需要一种方法来默认开启-w
或者-Wwarn
选项以在cabal repl
中使用。我该怎么做?还有,对于ghci
,默认标志是什么?