-
Notifications
You must be signed in to change notification settings - Fork 841
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
Analogue of cabal repl #130
Comments
LGTM. I'd argue for making this the same command as Assigning to @DanBurton for now, though someone else may wish to take a crack at it instead. |
Yeah, although I vote not to copy Cabal's approach much. Things that are annoying with
So I'd vote by default:
In other words, just work. |
What you're saying is valid. I sometimes want this behavior. But I also often want the opposite :)
|
I assume you meant target here instead of package. Yes, indeed. Sometimes that can happen.
Okay, I'm not sure we're talking about the same thing. A target is a section in the cabal file. I'm talking about targets within one package here.
Granted, it should be optional in any case. |
Oh, ok. I somehow assumed you were talking about multipe local cabal packages specified in a single stack.yaml. Then there's much less disagreement here. |
Okies. Actually loading all the packages is something @nh2 has been asking about -- it has some use in debugging to load everything into one big ghci session. I guess that could be another feature. |
Should include the autogen dirs:
|
So something like:
|
Works for me! Though I think if the load fails it shouldn't just bail out. E.g.
The user can just fix this and run |
I've never had great luck with I can see how sometimes it can be beneficial to use the compiled version of a package instead, since that speeds things up, so a flag either way looks good. |
@hesselink Indeed, it seems a lot of the time one could load up GHCi with Brainstorming, perhaps:
Then
Load up the This is also analogous to (Or |
Big 👍 to this in general, and to the improvements laid out in this thread. The biggest current pain point for me is the time it takes to |
@chrisdone We use a script that basically uses that approach: it adds all package source directories with |
Cool, sounds like we're all onboard with this going forward. @hesselink We've been taking a similar approach of specifying extensions per-file too in anticipation of loading everything on at once for debugging purposes. |
Note that |
This has been merged in, let's start tracking improvements in new issues. |
IIUC
stack ghci
simply calls ghci with the stack's package db.cabal repl
is more than that: if run in a directory with a cabal file, it'll enable the extensions listed in the cabal file (super-useful) and also load all package's modules (moderately useful).The text was updated successfully, but these errors were encountered: