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

How can I pass flags to cabal? #535

Closed
codygman opened this issue Jul 7, 2015 · 5 comments
Closed

How can I pass flags to cabal? #535

codygman opened this issue Jul 7, 2015 · 5 comments

Comments

@codygman
Copy link

codygman commented Jul 7, 2015

For instance I want dev to be set for this part of my cabal file:

if flag(dev) || flag(library-only)
        cpp-options:   -DDEVELOPMENT
        ghc-options:   -Wall -fwarn-tabs -O0
    else
        ghc-options:   -Wall -fwarn-tabs -O2
@snoyberg
Copy link
Contributor

snoyberg commented Jul 7, 2015

See the --help for the --flag option, it's basically --flag packagename:(-)flagname.

@snoyberg snoyberg closed this as completed Jul 7, 2015
@codygman
Copy link
Author

--flag doesn't seem to work with stack exec --flag executable:-fdevelopment -- yesod devel. I think it works when using stack exec --flag executable:-fdevelopment build.

@snoyberg
Copy link
Contributor

That's quite a different story. The question is really "how do I tell yesod devel to change flags," right? I'm not sure what you're trying to do though, yesod devel already sets the appropriate flags to work well with the scaffolding. Can you describe your goal a bit more clearly?

@codygman
Copy link
Author

I am trying to get my compile cycle to be faster, there was a ghc option
like "no-code" or something I wanted to try.
On Jul 13, 2015 7:15 PM, "Michael Snoyman" notifications@github.com wrote:

That's quite a different story. The question is really "how do I tell yesod
devel to change flags," right? I'm not sure what you're trying to do
though, yesod devel already sets the appropriate flags to work well with
the scaffolding. Can you describe your goal a bit more clearly?


Reply to this email directly or view it on GitHub
#535 (comment)
.

@snoyberg
Copy link
Contributor

It won't work with yesod sites anyway, since no-code can't be used when
you're using template Haskell.

On Mon, Jul 13, 2015, 6:24 PM codygman notifications@github.com wrote:

I am trying to get my compile cycle to be faster, there was a ghc option
like "no-code" or something I wanted to try.
On Jul 13, 2015 7:15 PM, "Michael Snoyman" notifications@github.com
wrote:

That's quite a different story. The question is really "how do I tell
yesod
devel to change flags," right? I'm not sure what you're trying to do
though, yesod devel already sets the appropriate flags to work well with
the scaffolding. Can you describe your goal a bit more clearly?


Reply to this email directly or view it on GitHub
<
#535 (comment)

.


Reply to this email directly or view it on GitHub
#535 (comment)
.

mpilgrem added a commit that referenced this issue Dec 7, 2022
For the context to this pull request, see see [Hpack issue #530](sol/hpack#530), the [Hpack PR #531](sol/hpack#531) and the alternative [Hpack PR #535](sol/hpack#535) (on which this PR builds). See also [Pantry PR #74](commercialhaskell/pantry#74) (on which this PR builds).
mpilgrem added a commit that referenced this issue Dec 7, 2022
For the context to this pull request, see see [Hpack issue #530](sol/hpack#530), the [Hpack PR #531](sol/hpack#531) and the alternative [Hpack PR #535](sol/hpack#535) (on which this PR builds). See also [Pantry PR #74](commercialhaskell/pantry#74) (on which this PR builds).
mpilgrem added a commit that referenced this issue Dec 11, 2022
For the context to this pull request, see see [Hpack issue #530](sol/hpack#530), the [Hpack PR #531](sol/hpack#531) and the alternative [Hpack PR #535](sol/hpack#535) (on which this PR builds). See also [Pantry PR #74](commercialhaskell/pantry#74) (on which this PR builds).
mpilgrem added a commit that referenced this issue Dec 15, 2022
For the context to this pull request, see see [Hpack issue #530](sol/hpack#530), the [Hpack PR #531](sol/hpack#531) and the alternative [Hpack PR #535](sol/hpack#535) (on which this PR builds). See also [Pantry PR #74](commercialhaskell/pantry#74) (on which this PR builds).
mpilgrem added a commit that referenced this issue Dec 16, 2022
For the context to this pull request, see see [Hpack issue #530](sol/hpack#530), the [Hpack PR #531](sol/hpack#531) and the alternative [Hpack PR #535](sol/hpack#535) (on which this PR builds). See also [Pantry PR #74](commercialhaskell/pantry#74) (on which this PR builds).
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