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

cabal v2-compile task #5834

Closed
fommil opened this issue Jan 11, 2019 · 2 comments
Closed

cabal v2-compile task #5834

fommil opened this issue Jan 11, 2019 · 2 comments

Comments

@fommil
Copy link
Contributor

fommil commented Jan 11, 2019

It would be very useful to have a v2-compile task that uses the correct version of with-compiler for the project. This would be complementary to v2-repl.

For example, this could be used by downstream tools (such as flycheck) as an alternative to invoking a mystery meat ghc directly.

The .ghc.* dir mechanism will kick in naturally thereafter.

It would be even better if there was a way to invoke said compiler, for a given package, with all the flags enabled, e.g. language extensions and warnings / errors.

@hvr
Copy link
Member

hvr commented Jan 11, 2019

doesn't cabal v2-exec ghc -- <flags> kinda implement this magic? (i.e. ghc will be substituted by whatever with-compiler was pointing to)

However, getting all the ghc-options is tricker as you'd need a specific component specified as target; this is something that the cabal show-build-info (see #2771) was supposed to help with -- or what @DanielG's http://hackage.haskell.org/package/cabal-helper should be able to help with until we get that.

@fommil
Copy link
Contributor Author

fommil commented Jan 11, 2019

umm, ok, that seems to do exactly what I want. I don't know how I didn't see this before 😖

@fommil fommil closed this as completed Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants