@@ -230,7 +230,12 @@ module Development.IDE.GHC.Compat.Core (
230230 ModuleOrigin (.. ),
231231 PackageName (.. ),
232232 -- * Linker
233+ #if !MIN_VERSION_ghc(9,11,0)
233234 Unlinked (.. ),
235+ #else
236+ LinkablePart (.. ),
237+ Unlinked ,
238+ #endif
234239 Linkable (.. ),
235240 unload ,
236241 -- * Hooks
@@ -537,6 +542,9 @@ import GHC.Utils.Error (mkPlainErrorMsgEnvelope)
537542import GHC.Utils.Panic
538543import GHC.Utils.TmpFs
539544import Language.Haskell.Syntax hiding (FunDep )
545+ #if MIN_VERSION_ghc(9,11,0)
546+ import System.OsPath.Types (OsPath )
547+ #endif
540548
541549-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
542550
@@ -549,7 +557,11 @@ import GHC.Types.Avail (greNamePrintableName)
549557import GHC.Hs (SrcSpanAnn' )
550558#endif
551559
560+ #if !MIN_VERSION_ghc(9,11,0)
552561mkHomeModLocation :: DynFlags -> ModuleName -> FilePath -> IO Module. ModLocation
562+ #else
563+ mkHomeModLocation :: DynFlags -> ModuleName -> OsPath -> IO Module. ModLocation
564+ #endif
553565mkHomeModLocation df mn f = pure $ GHC. mkHomeModLocation (GHC. initFinderOpts df) mn f
554566
555567pattern RealSrcSpan :: SrcLoc. RealSrcSpan -> Maybe BufSpan -> SrcLoc. SrcSpan
@@ -709,7 +721,7 @@ pattern GRE{gre_name, gre_par, gre_lcl, gre_imp} <- RdrName.GRE
709721#endif
710722 ,gre_par, gre_lcl, gre_imp = (toList -> gre_imp)}
711723
712- collectHsBindsBinders :: CollectPass p => Bag ( XRec p ( HsBindLR p idR )) -> [IdP p ]
724+ collectHsBindsBinders :: CollectPass p => LHsBinds p -> [IdP p ]
713725collectHsBindsBinders x = GHC. collectHsBindsBinders CollNoDictBinders x
714726
715727
@@ -790,3 +802,8 @@ mkSimpleTarget df fp = Target (TargetFile fp Nothing) True (homeUnitId_ df) Noth
790802#if MIN_VERSION_ghc(9,7,0)
791803lookupGlobalRdrEnv gre_env occ = lookupGRE gre_env (LookupOccName occ AllRelevantGREs )
792804#endif
805+
806+
807+ #if MIN_VERSION_ghc(9,11,0)
808+ type Unlinked = LinkablePart
809+ #endif
0 commit comments