Fix #16219: TemplateHaskell causes indefinite package build error
It should work to write an indefinite package using TemplateHaskell, so long as all of the actual TH code lives outside of the package. However, cleverness we had to build TH code even when building with -fno-code meant that we attempted to build object code for modules in an indefinite package, even when the signatures were not instantiated. This patch disables said logic in the event that an indefinite package is being typechecked. Signed-off-by:Edward Z. Yang <ezyang@fb.com> Test Plan: validate Reviewers: simonpj, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #16219 Differential Revision: https://phabricator.haskell.org/D5475
Showing
- compiler/main/GhcMake.hs 3 additions, 0 deletionscompiler/main/GhcMake.hs
- compiler/main/Packages.hs 1 addition, 0 deletionscompiler/main/Packages.hs
- testsuite/tests/backpack/cabal/T16219/LICENSE 30 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/LICENSE
- testsuite/tests/backpack/cabal/T16219/Makefile 18 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/Makefile
- testsuite/tests/backpack/cabal/T16219/Setup.hs 2 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/Setup.hs
- testsuite/tests/backpack/cabal/T16219/all.T 9 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/all.T
- testsuite/tests/backpack/cabal/T16219/backpack-issue.cabal 47 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/backpack-issue.cabal
- testsuite/tests/backpack/cabal/T16219/library-a-impl/A.hs 6 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/library-a-impl/A.hs
- testsuite/tests/backpack/cabal/T16219/library-a/A/Sig.hsig 5 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/library-a/A/Sig.hsig
- testsuite/tests/backpack/cabal/T16219/library-a/B.hs 6 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/library-a/B.hs
- testsuite/tests/backpack/cabal/T16219/library-b/C.hs 10 additions, 0 deletionstestsuite/tests/backpack/cabal/T16219/library-b/C.hs
Loading
Please register or sign in to comment