diff options
-rw-r--r-- | src/Haddock/Backends/LaTeX.hs | 12 | ||||
-rw-r--r-- | src/Haddock/Backends/Xhtml/Decl.hs | 13 | ||||
-rw-r--r-- | src/Haddock/Convert.hs | 17 | ||||
-rw-r--r-- | src/Haddock/GhcUtils.hs | 10 | ||||
-rw-r--r-- | src/Haddock/InterfaceFile.hs | 6 | ||||
-rw-r--r-- | src/Haddock/Lex.x | 4 | ||||
-rw-r--r-- | src/Main.hs | 2 |
7 files changed, 1 insertions, 63 deletions
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs index dce04cc4..7bfd0e4a 100644 --- a/src/Haddock/Backends/LaTeX.hs +++ b/src/Haddock/Backends/LaTeX.hs @@ -577,11 +577,7 @@ ppDataDecl instances subdocs _loc mbDoc dataDecl unicode -- ppConstrHdr is for (non-GADT) existentials constructors' syntax -#if __GLASGOW_HASKELL__ == 612 -ppConstrHdr :: HsExplicitForAll -> [Name] -> HsContext DocName -> Bool -> LaTeX -#else ppConstrHdr :: HsExplicitFlag -> [Name] -> HsContext DocName -> Bool -> LaTeX -#endif ppConstrHdr forall tvs ctxt unicode = (if null tvs then empty else ppForall) <+> @@ -850,11 +846,7 @@ ppFunLhType unicode ty = ppr_mono_ty pREC_FUN ty unicode -- Drop top-level for-all type variables in user style -- since they are implicit in Haskell -#if __GLASGOW_HASKELL__ == 612 -ppForAll :: HsExplicitForAll -> [Located (HsTyVarBndr DocName)] -#else ppForAll :: HsExplicitFlag -> [Located (HsTyVarBndr DocName)] -#endif -> Located (HsContext DocName) -> Bool -> LaTeX ppForAll expl tvs cxt unicode | show_forall = forall_part <+> ppLContext cxt unicode @@ -884,11 +876,7 @@ ppr_mono_ty _ (HsPArrTy ty) u = pabrackets (ppr_mono_lty pREC_TOP ppr_mono_ty _ (HsPredTy p) u = parens (ppPred u p) ppr_mono_ty _ (HsNumTy n) _ = text (show n) -- generics only ppr_mono_ty _ (HsSpliceTy {}) _ = error "ppr_mono_ty HsSpliceTy" -#if __GLASGOW_HASKELL__ == 612 -ppr_mono_ty _ (HsSpliceTyOut {}) _ = error "ppr_mono_ty HsQuasiQuoteTy" -#else ppr_mono_ty _ (HsQuasiQuoteTy {}) _ = error "ppr_mono_ty HsQuasiQuoteTy" -#endif ppr_mono_ty _ (HsRecTy {}) _ = error "ppr_mono_ty HsRecTy" ppr_mono_ty _ (HsCoreTy {}) _ = error "ppr_mono_ty HsCoreTy" diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs index 38302c24..2e8850e7 100644 --- a/src/Haddock/Backends/Xhtml/Decl.hs +++ b/src/Haddock/Backends/Xhtml/Decl.hs @@ -531,13 +531,8 @@ ppShortConstrParts summary con unicode qual = case con_res con of -- ppConstrHdr is for (non-GADT) existentials constructors' syntax -#if __GLASGOW_HASKELL__ == 612 -ppConstrHdr :: HsExplicitForAll -> [Name] -> HsContext DocName -> Bool - -> Qualification -> Html -#else ppConstrHdr :: HsExplicitFlag -> [Name] -> HsContext DocName -> Bool -> Qualification -> Html -#endif ppConstrHdr forall tvs ctxt unicode qual = (if null tvs then noHtml else ppForall) +++ @@ -687,11 +682,7 @@ ppFunLhType unicode qual ty = ppr_mono_ty pREC_FUN ty unicode qual -- Drop top-level for-all type variables in user style -- since they are implicit in Haskell -#if __GLASGOW_HASKELL__ == 612 -ppForAll :: HsExplicitForAll -> [Located (HsTyVarBndr DocName)] -#else ppForAll :: HsExplicitFlag -> [Located (HsTyVarBndr DocName)] -#endif -> Located (HsContext DocName) -> Bool -> Qualification -> Html ppForAll expl tvs cxt unicode qual | show_forall = forall_part <+> ppLContext cxt unicode qual @@ -722,11 +713,7 @@ ppr_mono_ty _ (HsPArrTy ty) u q = pabrackets (ppr_mono_lty pREC_TO ppr_mono_ty _ (HsPredTy p) u q = parens (ppPred u q p) ppr_mono_ty _ (HsNumTy n) _ _ = toHtml (show n) -- generics only ppr_mono_ty _ (HsSpliceTy {}) _ _ = error "ppr_mono_ty HsSpliceTy" -#if __GLASGOW_HASKELL__ == 612 -ppr_mono_ty _ (HsSpliceTyOut {}) _ _ = error "ppr_mono_ty HsQuasiQuoteTy" -#else ppr_mono_ty _ (HsQuasiQuoteTy {}) _ _ = error "ppr_mono_ty HsQuasiQuoteTy" -#endif ppr_mono_ty _ (HsCoreTy {}) _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty _ (HsRecTy {}) _ _ = error "ppr_mono_ty HsRecTy" diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs index 96133186..dde8c1b6 100644 --- a/src/Haddock/Convert.hs +++ b/src/Haddock/Convert.hs @@ -20,12 +20,7 @@ module Haddock.Convert where import HsSyn import TcType ( tcSplitSigmaTy ) import TypeRep -#if __GLASGOW_HASKELL__ == 612 -import Type ( splitKindFunTys ) -import BasicTypes -#else import Coercion ( splitKindFunTys, synTyConResKind ) -#endif import Name import Var import Class @@ -175,18 +170,10 @@ synifyDataCon use_gadt_syntax dc = noLoc $ linear_tys = zipWith (\ty bang -> let tySyn = synifyType WithinType ty in case bang of -#if __GLASGOW_HASKELL__ >= 613 HsUnpackFailed -> noLoc $ HsBangTy HsStrict tySyn HsNoBang -> tySyn -- HsNoBang never appears, it's implied instead. _ -> noLoc $ HsBangTy bang tySyn -#else - MarkedStrict -> noLoc $ HsBangTy HsStrict tySyn - MarkedUnboxed -> noLoc $ HsBangTy HsUnbox tySyn - NotMarkedStrict -> tySyn - -- HsNoBang never appears, it's implied instead. -#endif - ) (dataConOrigArgTys dc) (dataConStrictMarks dc) field_tys = zipWith (\field synTy -> ConDeclField @@ -245,11 +232,7 @@ synifyTyVars = map synifyTyVar kind = tyVarKind tv name = getName tv in if isLiftedTypeKind kind -#if __GLASGOW_HASKELL__ == 612 - then UserTyVar name -#else then UserTyVar name placeHolderKind -#endif else KindedTyVar name kind diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs index 9c5090af..a668d205 100644 --- a/src/Haddock/GhcUtils.hs +++ b/src/Haddock/GhcUtils.hs @@ -33,11 +33,7 @@ import RdrName (GlobalRdrEnv) import GhcMonad (withSession) #endif import HscTypes -#if MIN_VERSION_ghc(6,13,0) import UniqFM -#else -import LazyUniqFM -#endif import GHC @@ -88,15 +84,9 @@ isVarSym = isLexVarSym . occNameFS getMainDeclBinder :: HsDecl name -> Maybe name getMainDeclBinder (TyClD d) = Just (tcdName d) getMainDeclBinder (ValD d) = -#if __GLASGOW_HASKELL__ == 612 - case collectAcc d [] of - [] -> Nothing - (name:_) -> Just (unLoc name) -#else case collectHsBindBinders d of [] -> Nothing (name:_) -> Just name -#endif getMainDeclBinder (SigD d) = sigNameNoLoc d diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs index f66f862f..673040e3 100644 --- a/src/Haddock/InterfaceFile.hs +++ b/src/Haddock/InterfaceFile.hs @@ -64,11 +64,7 @@ binaryInterfaceMagic = 0xD0Cface -- because we store GHC datatypes in our interface files, we need to make sure -- we version our interface files accordingly. binaryInterfaceVersion :: Word16 -#if __GLASGOW_HASKELL__ == 612 -binaryInterfaceVersion = 15 -#elif __GLASGOW_HASKELL__ == 613 -binaryInterfaceVersion = 15 -#elif __GLASGOW_HASKELL__ == 700 +#if __GLASGOW_HASKELL__ == 700 binaryInterfaceVersion = 16 #elif __GLASGOW_HASKELL__ == 701 binaryInterfaceVersion = 16 diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x index 75d44fff..86f66e2d 100644 --- a/src/Haddock/Lex.x +++ b/src/Haddock/Lex.x @@ -189,11 +189,7 @@ strToHsQNames dflags str0 = #else let buffer = unsafePerformIO (stringToStringBuffer str0) #endif -#if MIN_VERSION_ghc(6,13,0) pstate = mkPState dflags buffer noSrcLoc -#else - pstate = mkPState buffer noSrcLoc dflags -#endif result = unP parseIdentifier pstate in case result of POk _ name -> Just [unLoc name] diff --git a/src/Main.hs b/src/Main.hs index d2c1ff8b..fa139706 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -103,9 +103,7 @@ handleGhcExceptions = hFlush stdout case e of PhaseFailed _ code -> exitWith code -#if ! MIN_VERSION_ghc(6,13,0) Interrupted -> exitFailure -#endif _ -> do print (e :: GhcException) exitFailure |