Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cabal repl support #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix cabal repl support #50

wants to merge 1 commit into from

Conversation

NicolasT
Copy link
Owner

Due to how this package hacks into the Cabal build process, cabal repl
didn't work: the cbits objects weren't built, and the object files
weren't passed to the GHC invocation correctly.

This commit fixes this hooking into the replHook from Setup.hs, and
trigger a build of cbits objects, and adapting the ghc-wrapper
script to detect --interactive usage of GHC, and adjust the
command-line arguments accordingly.

Note: stack repl doesn't work, because Stack seems to bypass
Setup.hs in its implementation, see commercialhaskell/stack#970.

See: commercialhaskell/stack#970

Due to how this package hacks into the Cabal build process, `cabal repl`
didn't work: the `cbits` objects weren't built, and the object files
weren't passed to the GHC invocation correctly.

This commit fixes this hooking into the `replHook` from `Setup.hs`, and
trigger a build of `cbits` objects, and adapting the `ghc-wrapper`
script to detect `--interactive` usage of GHC, and adjust the
command-line arguments accordingly.

Note: `stack repl` doesn't work, because Stack seems to bypass
`Setup.hs` in its implementation, see commercialhaskell/stack#970.

See: commercialhaskell/stack#970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant