diff options
Diffstat (limited to 'src/Haddock/Interface')
| -rw-r--r-- | src/Haddock/Interface/AttachInstances.hs | 6 | ||||
| -rw-r--r-- | src/Haddock/Interface/LexParseRn.hs | 16 | ||||
| -rw-r--r-- | src/Haddock/Interface/Rename.hs | 16 | 
3 files changed, 2 insertions, 36 deletions
| diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs index 43f2466d..b6d988dc 100644 --- a/src/Haddock/Interface/AttachInstances.hs +++ b/src/Haddock/Interface/AttachInstances.hs @@ -28,13 +28,7 @@ import InstEnv  import Class  import HscTypes (withSession, ioMsg)  import TcRnDriver (tcRnGetInfo) - -#if __GLASGOW_HASKELL__ > 610 || (__GLASGOW_HASKELL__ == 610 && __GHC_PATCHLEVEL__ >= 2)  import TypeRep hiding (funTyConName) -#else -import TypeRep -#endif -  import Var hiding (varName)  import TyCon  import PrelNames diff --git a/src/Haddock/Interface/LexParseRn.hs b/src/Haddock/Interface/LexParseRn.hs index 026e753c..dc7744c7 100644 --- a/src/Haddock/Interface/LexParseRn.hs +++ b/src/Haddock/Interface/LexParseRn.hs @@ -19,18 +19,13 @@ module Haddock.Interface.LexParseRn (    ) where  import Haddock.Types - -import Data.Maybe - -#if __GLASGOW_HASKELL__ >= 611  import Haddock.Interface.Lex  import Haddock.Interface.Parse  import Haddock.Interface.Rn  import Haddock.Interface.ParseModuleHeader  import Haddock.HsDoc +import Data.Maybe  import FastString -#endif -  import GHC  import RdrName @@ -47,7 +42,6 @@ lexParseRnHaddockCommentList hty gre docStrs = do  lexParseRnHaddockComment :: HaddockCommentType ->      GlobalRdrEnv -> HsDocString -> ErrMsgM (Maybe (HsDoc Name)) -#if __GLASGOW_HASKELL__ >= 611  lexParseRnHaddockComment hty gre (HsDocString fs) = do     let str = unpackFS fs     let toks = tokenise str @@ -59,9 +53,6 @@ lexParseRnHaddockComment hty gre (HsDocString fs) = do         tell ["doc comment parse failed: "++str]         return Nothing       Just doc -> return (Just (rnHsDoc gre doc)) -#else -lexParseRnHaddockComment _ _ doc = return (Just doc) -#endif  lexParseRnMbHaddockComment :: HaddockCommentType -> GlobalRdrEnv -> Maybe HsDocString -> ErrMsgM (Maybe (HsDoc Name))  lexParseRnMbHaddockComment _ _ Nothing = return Nothing @@ -69,7 +60,6 @@ lexParseRnMbHaddockComment hty gre (Just d) = lexParseRnHaddockComment hty gre d  -- yes, you always get a HaddockModInfo though it might be empty  lexParseRnHaddockModHeader :: GlobalRdrEnv -> GhcDocHdr -> ErrMsgM (HaddockModInfo Name, Maybe (HsDoc Name)) -#if __GLASGOW_HASKELL__ >= 611  lexParseRnHaddockModHeader gre mbStr = do    let failure = (emptyHaddockModInfo, Nothing)    case mbStr of @@ -82,7 +72,3 @@ lexParseRnHaddockModHeader gre mbStr = do            return failure          Right (info, doc) ->            return (rnHaddockModInfo gre info, Just (rnHsDoc gre doc)) -#else -lexParseRnHaddockModHeader _ hdr = return hdr -#endif - diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs index 48a14d23..0d678537 100644 --- a/src/Haddock/Interface/Rename.hs +++ b/src/Haddock/Interface/Rename.hs @@ -156,17 +156,9 @@ renameDocForDecl (mbDoc, fnArgsDoc) = do  renameMaybeDoc :: Maybe (HsDoc Name) -> RnM (Maybe (HsDoc DocName))  renameMaybeDoc = mapM renameDoc -#if __GLASGOW_HASKELL__ >= 611 +  renameLDocHsSyn :: LHsDocString -> RnM LHsDocString  renameLDocHsSyn = return -#else -renameLDocHsSyn :: LHsDoc Name -> RnM (LHsDoc DocName) -renameLDocHsSyn = renameLDoc - --- This is inside the #if to avoid a defined-but-not-used warning. -renameLDoc :: LHsDoc Name -> RnM (LHsDoc DocName) -renameLDoc = mapM renameDoc -#endif  renameDoc :: HsDoc Name -> RnM (HsDoc DocName) @@ -336,15 +328,9 @@ renameLTyClD (L loc d) = return . L loc =<< renameTyClD d  renameTyClD :: TyClDecl Name -> RnM (TyClDecl DocName)  renameTyClD d = case d of -#if __GLASGOW_HASKELL__ >= 611    ForeignType lname b -> do      lname' <- renameL lname      return (ForeignType lname' b) -#else -  ForeignType lname a b -> do -    lname' <- renameL lname -    return (ForeignType lname' a b) -#endif    TyFamily flav lname ltyvars kind -> do      lname'   <- renameL lname | 
