haskell.nix/test/ghc-options/stack.yaml
Rodney Lorrimar d7d24fde4b
mkStackPkgSet: filter out $locals package (#393)
I found that if I added this to my stack.yaml:

    ghc-options:
      $locals: -ddump-to-file -ddump-hi

As specified in https://docs.haskellstack.org/en/stable/yaml_configuration/#ghc-options

Then my build would fail to evaluate with:

    error: The option `packages."\$locals".package.identifier.name' is used but not defined.

So to fix it, we filter out these special package globs in mkStackPkgSet.

This commit also adds a regression test for that configuration option.
2020-01-09 16:07:34 +10:00

10 lines
178 B
YAML

resolver: lts-14.13
packages:
- .
ghc-options:
test-ghc-options: -DTEST_GHC_OPTION
# See https://github.com/ndmitchell/weeder/issues/53
$locals: -ddump-to-file -ddump-hi