@@ -36,11 +36,9 @@ module Development.IDE.GHC.Compat.Core (
36
36
maxRefHoleFits ,
37
37
maxValidHoleFits ,
38
38
setOutputFile ,
39
- #if MIN_VERSION_ghc(8,8,0)
40
39
CommandLineOption ,
41
40
#if !MIN_VERSION_ghc(9,2,0)
42
41
staticPlugins ,
43
- #endif
44
42
#endif
45
43
sPgm_F ,
46
44
settings ,
@@ -263,7 +261,7 @@ module Development.IDE.GHC.Compat.Core (
263
261
SrcLoc. noSrcSpan ,
264
262
SrcLoc. noSrcLoc ,
265
263
SrcLoc. noLoc ,
266
- #if !MIN_VERSION_ghc(8,10,0) && MIN_VERSION_ghc(8,8,0)
264
+ #if !MIN_VERSION_ghc(8,10,0)
267
265
SrcLoc. dL ,
268
266
#endif
269
267
-- * Finder
@@ -734,19 +732,12 @@ import NameCache
734
732
import NameEnv
735
733
import NameSet
736
734
import Packages
737
- #if MIN_VERSION_ghc(8,8,0)
738
735
import Panic hiding (try )
739
736
import qualified PlainPanic as Plain
740
- #else
741
- import Panic hiding (GhcException , try )
742
- import qualified Panic as Plain
743
- #endif
744
737
import Parser
745
738
import PatSyn
746
739
import RnFixity
747
- #if MIN_VERSION_ghc(8,8,0)
748
740
import Plugins
749
- #endif
750
741
import PprTyThing hiding (pprFamInst )
751
742
import PrelInfo
752
743
import PrelNames hiding (Unique , printName )
@@ -791,10 +782,8 @@ import SrcLoc (RealLocated,
791
782
#endif
792
783
793
784
794
- #if !MIN_VERSION_ghc(8,8,0)
795
785
import Data.List (isSuffixOf )
796
786
import System.FilePath
797
- #endif
798
787
799
788
800
789
#if MIN_VERSION_ghc(9,2,0)
@@ -931,42 +920,19 @@ pattern L l a <- GHC.L (getLoc -> l) a
931
920
{-# COMPLETE L #-}
932
921
#endif
933
922
934
- #elif MIN_VERSION_ghc(8,8,0)
923
+ #else
935
924
type HasSrcSpan = SrcLoc. HasSrcSpan
936
925
getLoc :: SrcLoc. HasSrcSpan a => a -> SrcLoc. SrcSpan
937
926
getLoc = 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
-
948
927
#endif
949
928
950
929
getRealSrcSpan :: SrcLoc. RealLocated a -> SrcLoc. RealSrcSpan
951
- #if !MIN_VERSION_ghc(8,8,0)
952
- getRealSrcSpan = SrcLoc. getLoc
953
- #else
954
930
getRealSrcSpan = SrcLoc. getRealSrcSpan
955
- #endif
956
-
957
931
958
932
-- | Add the @-boot@ suffix to all output file paths associated with the
959
933
-- module, not including the input file itself
960
934
addBootSuffixLocnOut :: 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
967
935
addBootSuffixLocnOut = Module. addBootSuffixLocnOut
968
- #endif
969
-
970
936
971
937
dataConExTyCoVars :: DataCon -> [TyCoVar ]
972
938
#if __GLASGOW_HASKELL__ >= 808
@@ -1031,25 +997,15 @@ noExtField = GHC.noExt
1031
997
#endif
1032
998
1033
999
ml_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
1039
1000
ml_hie_file = Module. ml_hie_file
1040
- #endif
1041
1001
1042
1002
#if !MIN_VERSION_ghc(9,0,0)
1043
1003
pattern NotBoot , IsBoot :: IsBootInterface
1044
1004
pattern NotBoot = False
1045
1005
pattern IsBoot = True
1046
1006
#endif
1047
1007
1048
- #if MIN_VERSION_ghc(8,8,0)
1049
1008
type PlainGhcException = Plain. PlainGhcException
1050
- #else
1051
- type PlainGhcException = Plain. GhcException
1052
- #endif
1053
1009
1054
1010
#if MIN_VERSION_ghc(9,0,0)
1055
1011
-- This is from the old api, but it still simplifies
0 commit comments