Refine "doingTH" check to include checking for QuasiQuotes
In several places we need to know whether any modules in the component being built use template haskell, because if they do we need to make sure the object files that will be needed are built. Previously, we checked whether TemplateHaskell was present in the extensions declared in the cabal file. Now we also check for QuasiQuotes. This patch adds usesTemplateHaskellOrQQ to Distribution.Types.BuildInfo and Distribution.PackageDescription. The checks "doingTH" checks in Distribuion.Simple.GHC, Distribution.Simple.GHCJS, and Distribution.Simple.LHC now delegate to usesTemplateHaskellOrQQ rather than each having identical checks inline.
Showing
- Cabal/Distribution/PackageDescription.hs 1 addition, 0 deletionsCabal/Distribution/PackageDescription.hs
- Cabal/Distribution/Simple/GHC.hs 2 additions, 2 deletionsCabal/Distribution/Simple/GHC.hs
- Cabal/Distribution/Simple/GHCJS.hs 2 additions, 3 deletionsCabal/Distribution/Simple/GHCJS.hs
- Cabal/Distribution/Simple/LHC.hs 2 additions, 2 deletionsCabal/Distribution/Simple/LHC.hs
- Cabal/Distribution/Types/BuildInfo.hs 9 additions, 0 deletionsCabal/Distribution/Types/BuildInfo.hs
- Cabal/Language/Haskell/Extension.hs 1 addition, 1 deletionCabal/Language/Haskell/Extension.hs
Loading
Please register or sign in to comment