A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/commercialhaskell/stack/issues/827 below:

Command-line --ghc-options don't seem to pass through · Issue #827 · commercialhaskell/stack · GitHub

The instructions to build leksah say to do:

cabal build regex-tdfa-text --ghc-options=-XFlexibleContexts

So I tried same with stack:

stack build regex-tdfa-text --ghc-options=-XFlexibleContexts     # and, just in case
stack build --ghc-options=-XFlexibleContexts regex-tdfa-text

And it didn't pick up FlexibleContexts, build fails. #758 gave me the impression this technique should work?

I then discovered you can add ghc-options sections to a stack.yaml, like so:

ghc-options:
  regex-tdfa-text: -XFlexibleContexts

(and then realized the one added to the leksah repo turns out to have had that, but I wasn't then using 'master', was trying to build release) and it built.

Shouldn't --ghc-options=-XBlah have passed -XBlah through to enable the Blah language extension? The stack documentation talks about this being preferable to doing it in stack.yaml so snapshot version isn't impacted (not that anyone else is using this package, but anyway).

[I gather the issue on point is https://github.com/leksah/leksah/issues/156 but I wanted to report my attempted workaround and my impression that it should have worked]

AfC


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4