-
-
Notifications
You must be signed in to change notification settings - Fork 391
"stack script" support or workarounds? #1064
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
Comments
Does |
@cocreature stack script does indeed support the ability to load something into ghci. Full details here Relevant snippet: A script (with program omitted): #!/usr/bin/env stack
{- stack
script
--resolver lts-8.2
--package turtle
-} As far as i can tell, this is the equivalent to load it up into ghci: #!/usr/bin/env stack
{- stack
--resolver lts-8.2
--install-ghc
exec ghci
--package turtle
-} With stack script, the resolver should already be there (not that I think ghcide actually needs it?) And the ghcide already knows where ghc is or it wouldn't be running in the first place. So it seems like figuring out how to shove things into GHCi automatically shouldn't be too difficult? Famous last words, of course. |
I was also looking into this. Another related problem is using For now my "workaround" is to add |
Stack scripts work in a "hacky" way. cradle:
stack:
component: "File.hs" # your local stack script Works fine for loading and modifying the stack script. The reason this works is that you can do |
related: haskell/hie-bios#217 |
closinf in favour of #111 |
I have some scripts written using
stack script
interpreter, which conveniently takes care of installing packages my scripts depend on. Understandably, ghcide is not aware of this, but maybe I can do something to make it aware?Is writing a
hie.yaml
something I need here? Didn't have to do that yet for other, non-script projects.This is how it looks currently:

The text was updated successfully, but these errors were encountered: