@@ -26,6 +26,7 @@ module Development.IDE.GHC.Compat(
26
26
#if !MIN_GHC_API_VERSION(8,8,0)
27
27
ml_hie_file ,
28
28
addBootSuffixLocnOut ,
29
+ getRealSrcSpan ,
29
30
#endif
30
31
hPutStringBuffer ,
31
32
addIncludePathsQuote ,
@@ -108,7 +109,6 @@ module Development.IDE.GHC.Compat(
108
109
oldListVisibleModuleNames ,
109
110
oldLookupModuleWithSuggestions ,
110
111
111
- getRealSpan ,
112
112
nodeInfo' ,
113
113
getNodeIds ,
114
114
stringToUnit ,
@@ -177,6 +177,7 @@ import DynamicLoading
177
177
import Plugins (Plugin (parsedResultAction ), withPlugins )
178
178
179
179
#if !MIN_GHC_API_VERSION(8,8,0)
180
+ import SrcLoc (RealLocated )
180
181
import System.FilePath ((-<.>) )
181
182
#endif
182
183
@@ -463,6 +464,9 @@ disableWarningsAsErrors df =
463
464
wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
464
465
wopt_unset_fatal dfs f
465
466
= dfs { fatalWarningFlags = EnumSet. delete f (fatalWarningFlags dfs) }
467
+
468
+ getRealSrcSpan :: RealLocated a -> RealSrcSpan
469
+ getRealSrcSpan = GHC. getLoc
466
470
#endif
467
471
468
472
applyPluginsParsedResultAction :: HscEnv -> DynFlags -> ModSummary -> ApiAnns -> ParsedSource -> IO ParsedSource
@@ -505,10 +509,6 @@ isQualifiedImport ImportDecl{ideclQualified} = ideclQualified
505
509
#endif
506
510
isQualifiedImport _ = False
507
511
508
- getRealSpan :: SrcSpan -> Maybe RealSrcSpan
509
- getRealSpan (OldRealSrcSpan x) = Just x
510
- getRealSpan _ = Nothing
511
-
512
512
513
513
514
514
#if __GLASGOW_HASKELL__ >= 900
0 commit comments