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

Have "stack ghci" warn when certain package options are likely to cause it to fail to load multiple packages #1270

Closed
mgsloan opened this issue Nov 2, 2015 · 2 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Nov 2, 2015

For example, it's usually the case that loading a package that specifies NoImplicitPrelude will fail to load along with a package that uses the prelude.

@mgsloan
Copy link
Contributor Author

mgsloan commented Nov 5, 2015

Implemented this for -XNoImplicitPrelude, -XCPP, -XNoTraditionalRecordSyntax, -XSafe, and -XTemplateHaskell. I can't think of many other cases that can cause breakage. Any other such circumstances can be covered in other issues.

One potential case is combining flags with their negations - if one package specifies -XNoMonomorphismRestriction, and another specifies -XMonomorphismRestriction. Doesn't seem worth the effort to warn about this in general.

* * * * * * * *
There are issues with this project which may prevent GHCi from working properly.

-XNoImplicitPrelude will be used, but GHCi will likely fail to build things which depend on the implicit prelude.
It is specified for:
    stack-repro:lib
But not for: 
    extradep:lib

To resolve, remove the flag(s) from the cabal file(s) and instead put them at the top of the haskell files.

It isn't yet possible to load multiple packages into GHCi in all cases - see
https://ghc.haskell.org/trac/ghc/ticket/10827
* * * * * * * *

@parsonsmatt
Copy link
Contributor

Very nice. Thanks! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants