@@ -36,11 +36,9 @@ module Development.IDE.GHC.Compat.Core (
3636 maxRefHoleFits ,
3737 maxValidHoleFits ,
3838 setOutputFile ,
39- #if MIN_VERSION_ghc(8,8,0)
4039 CommandLineOption ,
4140#if !MIN_VERSION_ghc(9,2,0)
4241 staticPlugins ,
43- #endif
4442#endif
4543 sPgm_F ,
4644 settings ,
@@ -263,7 +261,7 @@ module Development.IDE.GHC.Compat.Core (
263261 SrcLoc. noSrcSpan ,
264262 SrcLoc. noSrcLoc ,
265263 SrcLoc. noLoc ,
266- #if !MIN_VERSION_ghc(8,10,0) && MIN_VERSION_ghc(8,8,0)
264+ #if !MIN_VERSION_ghc(8,10,0)
267265 SrcLoc. dL ,
268266#endif
269267 -- * Finder
@@ -734,19 +732,12 @@ import NameCache
734732import NameEnv
735733import NameSet
736734import Packages
737- #if MIN_VERSION_ghc(8,8,0)
738735import Panic hiding (try )
739736import qualified PlainPanic as Plain
740- #else
741- import Panic hiding (GhcException , try )
742- import qualified Panic as Plain
743- #endif
744737import Parser
745738import PatSyn
746739import RnFixity
747- #if MIN_VERSION_ghc(8,8,0)
748740import Plugins
749- #endif
750741import PprTyThing hiding (pprFamInst )
751742import PrelInfo
752743import PrelNames hiding (Unique , printName )
@@ -791,10 +782,8 @@ import SrcLoc (RealLocated,
791782#endif
792783
793784
794- #if !MIN_VERSION_ghc(8,8,0)
795785import Data.List (isSuffixOf )
796786import System.FilePath
797- #endif
798787
799788
800789#if MIN_VERSION_ghc(9,2,0)
@@ -931,42 +920,19 @@ pattern L l a <- GHC.L (getLoc -> l) a
931920{-# COMPLETE L #-}
932921#endif
933922
934- #elif MIN_VERSION_ghc(8,8,0)
923+ #else
935924type HasSrcSpan = SrcLoc. HasSrcSpan
936925getLoc :: SrcLoc. HasSrcSpan a => a -> SrcLoc. SrcSpan
937926getLoc = SrcLoc. getLoc
938-
939- #else
940-
941- class HasSrcSpan a where
942- getLoc :: a -> SrcSpan
943- instance HasSrcSpan Name where
944- getLoc = nameSrcSpan
945- instance HasSrcSpan (SrcLoc. GenLocated SrcSpan a ) where
946- getLoc = SrcLoc. getLoc
947-
948927#endif
949928
950929getRealSrcSpan :: SrcLoc. RealLocated a -> SrcLoc. RealSrcSpan
951- #if !MIN_VERSION_ghc(8,8,0)
952- getRealSrcSpan = SrcLoc. getLoc
953- #else
954930getRealSrcSpan = SrcLoc. getRealSrcSpan
955- #endif
956-
957931
958932-- | Add the @-boot@ suffix to all output file paths associated with the
959933-- module, not including the input file itself
960934addBootSuffixLocnOut :: GHC. ModLocation -> GHC. ModLocation
961- #if !MIN_VERSION_ghc(8,8,0)
962- addBootSuffixLocnOut locn
963- = locn { Module. ml_hi_file = Module. addBootSuffix (Module. ml_hi_file locn)
964- , Module. ml_obj_file = Module. addBootSuffix (Module. ml_obj_file locn)
965- }
966- #else
967935addBootSuffixLocnOut = Module. addBootSuffixLocnOut
968- #endif
969-
970936
971937dataConExTyCoVars :: DataCon -> [TyCoVar ]
972938#if __GLASGOW_HASKELL__ >= 808
@@ -1031,25 +997,15 @@ noExtField = GHC.noExt
1031997#endif
1032998
1033999ml_hie_file :: GHC. ModLocation -> FilePath
1034- #if !MIN_VERSION_ghc(8,8,0)
1035- ml_hie_file ml
1036- | " boot" `isSuffixOf ` Module. ml_hi_file ml = Module. ml_hi_file ml -<.> " .hie-boot"
1037- | otherwise = Module. ml_hi_file ml -<.> " .hie"
1038- #else
10391000ml_hie_file = Module. ml_hie_file
1040- #endif
10411001
10421002#if !MIN_VERSION_ghc(9,0,0)
10431003pattern NotBoot , IsBoot :: IsBootInterface
10441004pattern NotBoot = False
10451005pattern IsBoot = True
10461006#endif
10471007
1048- #if MIN_VERSION_ghc(8,8,0)
10491008type PlainGhcException = Plain. PlainGhcException
1050- #else
1051- type PlainGhcException = Plain. GhcException
1052- #endif
10531009
10541010#if MIN_VERSION_ghc(9,0,0)
10551011-- This is from the old api, but it still simplifies
0 commit comments