When calling for example stack build regex-tdfa-text --ghc-options -XFlexibleContexts (a workaround for a bug in that package) the option --ghc-options has no effect and the build fails.
It's the same problem as in this thread
I've looked at the sources and the reason is this line. If I change it to if True and rebuild Stack, the GHC Options are passed correctly.
There's obviously a reason why this check is there, but it doesn't work properly.