diff options
author | Doug Wilson <dwilson@ricoh.co.nz> | 2017-05-28 03:37:38 +1200 |
---|---|---|
committer | Alex Biehl <alexbiehl@gmail.com> | 2017-05-27 17:37:38 +0200 |
commit | c4a06a877be56d5cd790f8abb7928fa39458e1e4 (patch) | |
tree | 713597b12f7a278b1e56566169d418fc01505d98 /haddock-api | |
parent | b7d7b7acd42cbe424afde3c8a5a59a0706445343 (diff) |
Don't enable compilation for template haskell (#624)
This is no longer necessary after
ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index 62b0aea9..1d643ac9 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -110,11 +110,7 @@ createIfaces0 verbosity modules flags instIfaceMap = -- resulting ModSummaries. (if useTempDir then withTempOutputDir else id) $ do modGraph <- depAnalysis - if needsTemplateHaskell modGraph then do - modGraph' <- enableCompilation modGraph - createIfaces verbosity flags instIfaceMap modGraph' - else - createIfaces verbosity flags instIfaceMap modGraph + createIfaces verbosity flags instIfaceMap modGraph where useTempDir :: Bool @@ -137,17 +133,6 @@ createIfaces0 verbosity modules flags instIfaceMap = depanal [] False - enableCompilation :: ModuleGraph -> Ghc ModuleGraph - enableCompilation modGraph = do - let enableComp d = let platform = targetPlatform d - in d { hscTarget = defaultObjectTarget platform } - modifySessionDynFlags enableComp - -- We need to update the DynFlags of the ModSummaries as well. - let upd m = m { ms_hspp_opts = enableComp (ms_hspp_opts m) } - let modGraph' = map upd modGraph - return modGraph' - - createIfaces :: Verbosity -> [Flag] -> InstIfaceMap -> ModuleGraph -> Ghc [Interface] createIfaces verbosity flags instIfaceMap mods = do let sortedMods = flattenSCCs $ topSortModuleGraph False mods Nothing |