Feature request: Only print GHCi flags without opening the REPL
- Dominant language
- Haskell
- Stars
- 51
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
## Feature
Add an option for `hrepl` to only print the relevant flags to GHCi for loading the specified range of targets. This should probably exclude flags that are only required for `hrepl` specifics, e.g. for the ghci script that `hrepl` defines.
## Use-case
The use-case I have in mind is to use `hrepl` in a [`hie-bios` cradle](https://github.com/mpickering/hie-bios/) to enable [`ghcide`](https://github.com/digital-asset/ghcide#readme) to load rules_haskell projects.
`hie-bios` has a `bios` cradle that takes a program that will write all required GHC flags to a file specified by the `$HIE_BIOS_OUTPUT` environment variable. `hrepl` could be used as that program. Furthermore, `hie-bios` could be extended with a dedicated Bazel cradle (reviving the [currently disabled one](https://github.com/mpickering/hie-bios/blob/5311e704f5745ac330cdb67ddf9e760b89ade9e0/src/HIE/Bios/Cradle.hs#L527)).
An example use-case could look like this:
```
cradle:
multi:
- path: "./src"
config: { cradle: {bazel: {targets: ["//src/..."]}} }
- path: "./test"
config: { cradle: {bazel: {targets: ["//test/..."]}} }
```
Assuming wild-card support in `hrepl` (or the `bazel` cradle) and multi-cradle support in `ghcide`.
Contributor guide
Assessment
This issue has not been assessed yet.