Reenable GHC environment file support
commit230c2489fdb3a38d55ec85ae2c35098e819305ab
authorHerbert Valerio Riedel <hvr@gnu.org>
Sun, 2 Apr 2017 17:14:48 +0000 (2 19:14 +0200)
committerHerbert Valerio Riedel <hvr@gnu.org>
Mon, 15 May 2017 07:41:02 +0000 (15 09:41 +0200)
tree544d84677a89934d82b2fcecef41eb5026344dbd
parent0f41001bdbdf3fc69570e1af92ce108eb17ceec5
Reenable GHC environment file support

This was temporarily disabled via
3033776a742022693917d05ce18440c560e721e7 due to #4010
but it turns out that we can easily workaround this for
older Cabal versions.

All we need to do is inject `--ghc-options=-hide-all-packages` into
the flags passed to Setup.hs
(this was suggested by @dcoutts in
https://github.com/haskell/cabal/issues/4010#issuecomment-254958478)

Luckily, `-hide-all-packages` is idempotent in GHC, so we can place it
anywhere on the GHC command-line as well as multiple times with the
same result.

This would close #4010
cabal-install/Distribution/Client/ProjectPlanOutput.hs
cabal-install/Distribution/Client/ProjectPlanning.hs