You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, let me praise the documentation, which looks great!
The issue: It took me very long to find how to correctly place ghc-options into stack.yaml so they are passed to the compiler when building my project.
I think the docs could be improved to add "ghc-options" also to "project specific" and link to their description under "non-project specific".
After all, I consider ghc-options akin to flags, and those are described under "project specific".
(Of course, not all GHC options are project specific, and there is options to pass GHC options also to the dependencies, but still, they are often specific to the project.)
The text was updated successfully, but these errors were encountered:
@andreasabel, the structure of Stack's options, explained here, is that:
non-project specific options (the great majority) can be configured globally or at the project level (and ghc-options is an example of that); and
project-specific options can only be configured at the project level.
I think the distinction made between Cabal flags (flags) and GHC options (ghc-options) is that the former generally affects what is built and the latter can affect how it is built (eg optimisation, warnings, verbosity).
First, let me praise the documentation, which looks great!
The issue: It took me very long to find how to correctly place
ghc-options
intostack.yaml
so they are passed to the compiler when building my project.The "project specific" listing does not contain them: https://docs.haskellstack.org/en/v3.3.1/configure/yaml/project/
Eventually I found them under "Non-project specific": https://docs.haskellstack.org/en/v3.3.1/configure/yaml/non-project/#ghc-options
I think the docs could be improved to add "ghc-options" also to "project specific" and link to their description under "non-project specific".
After all, I consider
ghc-options
akin toflags
, and those are described under "project specific".(Of course, not all GHC options are project specific, and there is options to pass GHC options also to the dependencies, but still, they are often specific to the project.)
The text was updated successfully, but these errors were encountered: