diff options
author | David Waern <david.waern@gmail.com> | 2009-01-10 20:22:25 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2009-01-10 20:22:25 +0000 |
commit | f9e1fef6380ecc96b49e90eed7be74072c32a577 (patch) | |
tree | 17284c32259341debf3aeb9b0cb66d39664ad750 /src/Haddock | |
parent | 531fee6ea936ac6133de9b558a030f2a6c5cdf77 (diff) |
Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Interface.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Haddock/Interface.hs b/src/Haddock/Interface.hs index aa77e042..49eef96c 100644 --- a/src/Haddock/Interface.hs +++ b/src/Haddock/Interface.hs @@ -87,6 +87,7 @@ createInterfaces' modules flags instIfaceMap = do setTargets targets modgraph <- depanal [] False +#if (__GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ >= 2) || __GLASGOW_HASKELL__ >= 611 -- If template haskell is used by the package, we can not use -- HscNothing as target since we might need to run code generated from -- one or more of the modules during typechecking. @@ -98,6 +99,9 @@ createInterfaces' modules flags instIfaceMap = do let addHscC m = m { ms_hspp_opts = (ms_hspp_opts m) { hscTarget = HscC } } return (map addHscC modgraph) else return modgraph +#else + let modgraph' = modgraph +#endif let orderedMods = flattenSCCs $ topSortModuleGraph False modgraph' Nothing (ifaces, _) <- foldM (\(ifaces, modMap) modsum -> do |