Repository : ssh://darcs.haskell.org//srv/darcs/haddock

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c3278a9d3c17ea0929d39116e431a2839bb845ca

>---------------------------------------------------------------

commit c3278a9d3c17ea0929d39116e431a2839bb845ca
Author: David Waern <[email protected]>
Date:   Fri Nov 25 02:39:26 2011 +0100

    Remove #ifs for older compiler versions.

>---------------------------------------------------------------

 src/Haddock/GhcUtils.hs                  |    2 --
 src/Haddock/Interface/AttachInstances.hs |    4 ----
 src/Haddock/Interface/Create.hs          |    4 ----
 src/Haddock/InterfaceFile.hs             |    2 --
 src/Haddock/Lex.x                        |    4 ----
 5 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs
index d5423be..6d17058 100644
--- a/src/Haddock/GhcUtils.hs
+++ b/src/Haddock/GhcUtils.hs
@@ -30,9 +30,7 @@ import Name
 import Packages
 import Module
 import RdrName (GlobalRdrEnv)
-#if MIN_VERSION_ghc(7,1,0)
 import GhcMonad (withSession)
-#endif
 import HscTypes
 import UniqFM
 import GHC
diff --git a/src/Haddock/Interface/AttachInstances.hs 
b/src/Haddock/Interface/AttachInstances.hs
index 01d5b0f..5b7771e 100644
--- a/src/Haddock/Interface/AttachInstances.hs
+++ b/src/Haddock/Interface/AttachInstances.hs
@@ -25,11 +25,7 @@ import GHC
 import Name
 import InstEnv
 import Class
-#if MIN_VERSION_ghc(7,1,0)
 import GhcMonad (withSession)
-#else
-import HscTypes (withSession)
-#endif
 import TysPrim( funTyCon )
 import MonadUtils (liftIO)
 import TcRnDriver (tcRnGetInfo)
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index caaed13..155cd93 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -275,11 +275,7 @@ filterOutInstances = filter (\(L _ d, _, _) -> not 
(isInstD d))
 -- bindings from an 'HsGroup'.
 declsFromGroup :: HsGroup Name -> [Decl]
 declsFromGroup group_ =
-#if MIN_VERSION_ghc(7,0,2)
   mkDecls (concat . hs_tyclds)  TyClD  group_ ++
-#else
-  mkDecls hs_tyclds             TyClD  group_ ++
-#endif
   mkDecls hs_derivds            DerivD group_ ++
   mkDecls hs_defds              DefD   group_ ++
   mkDecls hs_fords              ForD   group_ ++
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 68bc20b..64f8baa 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -37,9 +37,7 @@ import UniqSupply
 import UniqFM
 import IfaceEnv
 import HscTypes
-#if MIN_VERSION_ghc(7,1,0)
 import GhcMonad (withSession)
-#endif
 import FastMutInt
 import FastString
 import Unique
diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x
index e41c946..153f667 100644
--- a/src/Haddock/Lex.x
+++ b/src/Haddock/Lex.x
@@ -222,11 +222,7 @@ ident pos str sc cont dflags =
 
 strToHsQNames :: DynFlags -> RealSrcLoc -> String -> Maybe [RdrName]
 strToHsQNames dflags loc str0 = 
-#if MIN_VERSION_ghc(7,1,0)
   let buffer = stringToStringBuffer str0
-#else
-  let buffer = unsafePerformIO (stringToStringBuffer str0)
-#endif
       pstate = mkPState dflags buffer loc
       result = unP parseIdentifier pstate 
   in case result of 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to