-
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
Plan for "stack ghci" to properly handle different default-extensions in different components #2173
Comments
I run into this occasionally. I'd be nice if I often use I'm able to solve this with a
|
I believe that @AndrewRademacher intends to work on this as a continuation of #2457 |
@mgsloan @cdepillabout , this one is is my court. Package level control of DynFlags is currently in progress. I'm planning on having this mostly worked out by the end of tomorrow. |
I've recently revisited this approach. It's a good idea for getting everything to load into ghci. However, it doesn't quite work well with |
I was mostly avoiding this pain using ghcid. But now with ghcide this is quite a pain, since this bug blocks usage of it. |
I've opened https://gitlab.haskell.org/ghc/ghc/issues/17195 |
Conflicts between extensions is the primary cause of
stack ghci
not working properly with a multi-package / multi-component project. This is why I added code to describe to the user the conflicts that could occur: #1270When looking at the code for
ghci
(well,intero
! https://github.com/chrisdone/intero), I noticed that it's actually quite feasible for us to do the following in the ghci script:In this case,
pkg1
has TemplateHaskell specified as adefault-extension
.pkg2
doesn't, so it gets unset before loading those modules. The tricky part of this is that these loads need to be done in dependency order.Another approach, which will hopefully also be taken, is to solve this more completely in intero itself: https://github.com/chrisdone/intero/issues/41 . It seems reasonably feasible to have different flags for different modules. With this approach, we don't need to worry about knowing the order of dependencies as that can just be handled by normal ghc logic. On the other hand, it'd be good for
stack
to use vanillaghci
well too.The text was updated successfully, but these errors were encountered: