diff --git a/patches/ghcide-2.0.0.1.patch b/patches/ghcide-2.0.0.1.patch index 72cdd0b3abcd26dacced127518726ca1cba2f722..51b38b4c1f4d3dcd873c5507c070a92291da5e18 100644 --- a/patches/ghcide-2.0.0.1.patch +++ b/patches/ghcide-2.0.0.1.patch @@ -11,7 +11,7 @@ index 8b4b467..60d6634 100644 default-language: Haskell2010 build-depends: diff --git a/src/Development/IDE/Core/Compile.hs b/src/Development/IDE/Core/Compile.hs -index 1f70e96..28c99e2 100644 +index 1f70e96..7075816 100644 --- a/src/Development/IDE/Core/Compile.hs +++ b/src/Development/IDE/Core/Compile.hs @@ -61,7 +61,7 @@ import qualified Data.HashMap.Strict as HashMap @@ -32,6 +32,15 @@ index 1f70e96..28c99e2 100644 import qualified Development.IDE.GHC.Compat as Compat import qualified Development.IDE.GHC.Compat as GHC import qualified Development.IDE.GHC.Compat.Util as Util +@@ -122,7 +122,7 @@ import TcSplice + #endif + + #if MIN_VERSION_ghc(9,2,0) +-import GHC (Anchor (anchor), ++import GHC (Anchor, anchor, + EpaComment (EpaComment), + EpaCommentTok (EpaBlockComment, EpaLineComment), + ModuleGraph, epAnnComments, @@ -459,11 +459,15 @@ filterUsages = id -- | Mitigation for https://gitlab.haskell.org/ghc/ghc/-/issues/22744 @@ -343,6 +352,19 @@ index c4f9cd5..7978924 100644 (formatBulleted ctx $ e) #else (formatBulleted ctx $ Error.renderDiagnostic e) +diff --git a/src/Development/IDE/GHC/Compat/Parser.hs b/src/Development/IDE/GHC/Compat/Parser.hs +index 2fd5b74..79edee4 100644 +--- a/src/Development/IDE/GHC/Compat/Parser.hs ++++ b/src/Development/IDE/GHC/Compat/Parser.hs +@@ -53,7 +53,7 @@ import qualified GHC.Parser.Annotation as Anno + import qualified GHC.Parser.Lexer as Lexer + import GHC.Types.SrcLoc (PsSpan (..)) + #if MIN_VERSION_ghc(9,2,0) +-import GHC (Anchor (anchor), ++import GHC (Anchor, anchor, + EpAnnComments (priorComments), + EpaComment (EpaComment), + EpaCommentTok (..), diff --git a/src/Development/IDE/GHC/Orphans.hs b/src/Development/IDE/GHC/Orphans.hs index b9d1646..1e4c92b 100644 --- a/src/Development/IDE/GHC/Orphans.hs @@ -361,6 +383,22 @@ index b9d1646..1e4c92b 100644 instance Show HomeModInfo where show = show . mi_module . hm_iface +diff --git a/src/Development/IDE/Import/FindImports.hs b/src/Development/IDE/Import/FindImports.hs +index a5b356a..42fcde3 100644 +--- a/src/Development/IDE/Import/FindImports.hs ++++ b/src/Development/IDE/Import/FindImports.hs +@@ -196,7 +196,11 @@ notFoundErr env modName reason = + } + LookupUnusable unusable -> + let unusables' = map get_unusable unusable ++#if MIN_VERSION_ghc(9,9,0) ++ get_unusable (_, ModUnusable r) = r ++#else + get_unusable (m, ModUnusable r) = (moduleUnit m, r) ++#endif + get_unusable (_, r) = + pprPanic "findLookupResult: unexpected origin" (ppr r) + in notFound {fr_unusables = unusables'} diff --git a/src/Development/IDE/Plugin/Completions/Logic.hs b/src/Development/IDE/Plugin/Completions/Logic.hs index 677cd74..d72fe8e 100644 --- a/src/Development/IDE/Plugin/Completions/Logic.hs