I have a haskell project which I compile with -Werror
by default. This means that when I run cabal repl
it runs with the option -Werror
tu
You can set GHCi options in your ~/.ghci
file:
:set -w
This overrides the -Wall
from cabal repl
for me.
My understanding is that ghci
has the same defaults a ghc
: it's like calling the compiler with no flags. cabal repl
gets its defaults from your .cabal
file (like ghc-options: -Wall
), but this is overridden by your ~/.ghci
file.
You can also create a .ghci
file in your project directory, with per-project settings there. However, this seems to interact awkwardly with my global ~/.ghci
file: adding a set -Wall
does not override the :set -w
from the global one. I'm not sure if this behavior is intended or I'm just misunderstanding something.