From 84d56e33fab93772cc4822ac9b6c80a91542597d Mon Sep 17 00:00:00 2001 From: David Waern Date: Wed, 23 Jul 2008 23:21:15 +0000 Subject: Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. --- src/Haddock/GHC/Typecheck.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Haddock') diff --git a/src/Haddock/GHC/Typecheck.hs b/src/Haddock/GHC/Typecheck.hs index f0626231..0df6fc29 100644 --- a/src/Haddock/GHC/Typecheck.hs +++ b/src/Haddock/GHC/Typecheck.hs @@ -80,6 +80,10 @@ mkGhcModule (mod, file, checkedMod) dynflags = GhcModule { ghcInstances = modInfoInstances modInfo } where - HsModule _ _ _ _ _ mbOpts _ _ = unLoc parsed +#if __GLASGOW_HASKELL__ == 608 && __GHC_PATCHLEVEL__ == 2 + HsModule _ _ _ _ _ mbOpts _ _ = unLoc parsed +#else + mbOpts = haddockOptions dynflags +#endif (group, _, mbExports, mbDoc, info) = renamed - (parsed, renamed, _, modInfo) = checkedMod + (parsed, renamed, _, modInfo) = checkedMod -- cgit v1.2.3