haskell / haskell/cabal

`cabal repl` ignores `.ghci` files

Open
#8,544 7 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/repl resolution: invalid type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
`cabal repl` ignores the `.ghci` file in the project directory. I also tried to put the `.ghci` file into my home directory, passing a `.ghci` file via the `-ghci-script` option, but the file is never loaded no matter which method I use.

**To Reproduce**
Steps to reproduce the behavior:

* Clone this project: https://github.com/input-output-hk/cardano-ledger
* Create a `.ghci` in the project directory with some content (for example `:set prompt .ghci loaded`)
* Run `cabal v2-repl test:cardano-ledger-alonzo-test --ghc-options="-Wwarn"`

After doing the steps above, the `.ghci` file is ignored by the REPL and it runs as it would without a `.ghci` file.

**Expected behavior**
The repl starts and runs all the commands in the `.ghci` file.

**System information**
- NixOS
- `cabal` 3.8.1.0
- `ghc` 8.10.7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.