commercialhaskell / commercialhaskell/stack
Equivalent of Cabal's `preRepl`, `replHook`, `postRepl` hooks for `stack ghci`
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### Steps to reproduce
1. Create a Stack project `stack new Foo`.
2. Add the following to `Setup.hs`:
```
import Distribution.Simple
main = defaultMain simpleUserHooks
{
preRepl = myPreRepl
}
myPreRepl :: Args -> ReplFlags -> IO HookedBuildInfo
myPreRepl args replFlags = do
putStrln "here!!!"
(preRepl simpleUserHooks) args replFlags
```
3. Run the repl: `stack repl`
### Expected
"here!!!" on the console.
### Actual
`ghci` loads but there is no output.
### Stack version
```
$ stack --version
Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2
```
### Method of installation
* Official binary, downloaded from stackage.org or fpcomplete's package repository
Contributor guide
Assessment
This issue has not been assessed yet.