Should `cabal repl` error out on `--ghc-options`?
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
The doc says that you should use `--repl-options` instead of `--ghc-options`:
https://github.com/haskell/cabal/blob/f53087850d5db27f86fe622d1ff28cd5ab082766/doc/cabal-commands.rst?plain=1#L798-L803
I found out about this by chasing erratic behavior of `cabal repl --ghc-options` for many hours, see:
- https://github.com/sol/doctest/issues/390
What I learned there is that `cabal repl --ghc-options` works _exactly the first time after `cabal build`_; in subsequent calls the `--ghc-options` of the first call are used, added or deleted options are ignored.
Needless to say, I find such behavior __outright harmful__. I felt positively jinxed.
I think if `cabal repl` does not handle `--ghc-options` in the expected way (but some erratic seemingly arbitrary way), it should rather error out than fool around with the user.
What do you say?
Contributor guide
Assessment
This issue has not been assessed yet.