Skip to content
  • Douglas Wilson's avatar
    Refine "doingTH" check to include checking for QuasiQuotes · a0a506dd
    Douglas Wilson authored
    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.
    a0a506dd