-
Notifications
You must be signed in to change notification settings - Fork 42
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
can hint run :d, :i commands? #101
Comments
No, it's not. hint is a wrapper around the ghc api, not around the ghci executable, so it's not as easy as exposing a function which forwards those commands to ghci. Furthermore, I would prefer to expose those features as independent functions with relatively-precise types rather than by extending Something like this:
Would you like to try adding those features to hint yourself? I don't have a lot of time to dedicate to |
Thanks for the quick response. I agree with the design (keep separate actions in separate functions). Is there a |
If you want to interact directly with ghci, rather than using hint or the ghc api, I recommend taking a look at the doctest project, they have a system for interacting with a ghci process and it might be easier to extract that from the doctest project than to figure out the ghc api. The ghc api is a beast, and I'm not intimately familiar with it myself, as I've inherited this codebase from someone else. hint exists to re-expose part of that beast in a hopefully much simpler API! |
I did some research, taking Actual implementation is
It is exported as part of a structure:
but that's not available in https://hackage.haskell.org/package/ghc-8.10.1/docs/GHCi.html - because that does not import
The implementation uses So, implementation in |
Thanks for taking a look! This The Finally, So while it's true that we have to do some work around |
Right. I try to keep this in my todo-queue. |
Hi. I am using hint for https://github.com/jwaldmann/safe-tidal-cli.
Is it possible to execute ghci commands
:doc
,:info
in a hint session?runStmt
givesWontCompile
.The text was updated successfully, but these errors were encountered: