Skip to content

Commit 3bbe9ad

Browse files
committed
attempt compat. with GHC 9.x
1 parent 0dc5dde commit 3bbe9ad

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ghcide/src/Development/IDE/GHC/Orphans.hs

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ instance Hashable GhcPlugins.InstalledUnitId where
5151
hashWithSalt salt = hashWithSalt salt . installedUnitIdString
5252
#else
5353
instance Show InstalledUnitId where show = prettyPrint
54+
deriving instance Ord SrcSpan
55+
deriving instance Ord UnhelpfulSpanReason
5456
#endif
5557

5658
instance NFData SB.StringBuffer where rnf = rwhnf

ghcide/src/Development/IDE/Plugin/Completions.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import Control.Monad.Extra
1313
import Control.Monad.IO.Class
1414
import Control.Monad.Trans.Maybe
1515
import Data.Aeson
16+
import qualified Data.HashMap.Strict as Map
17+
import qualified Data.HashSet as Set
1618
import Data.List (find)
1719
import Data.Maybe
1820
import qualified Data.Text as T
@@ -33,6 +35,7 @@ import Development.IDE.Plugin.CodeAction (newImport,
3335
import Development.IDE.Plugin.CodeAction.ExactPrint
3436
import Development.IDE.Plugin.Completions.Logic
3537
import Development.IDE.Plugin.Completions.Types
38+
import Development.IDE.Types.Exports
3639
import Development.IDE.Types.HscEnvEq (HscEnvEq (envPackageExports),
3740
hscEnv)
3841
import Development.IDE.Types.Location
@@ -46,9 +49,6 @@ import qualified Language.LSP.VFS as VFS
4649
#if MIN_VERSION_ghc(9,0,0)
4750
import GHC.Tc.Module (tcRnImportDecls)
4851
#else
49-
import qualified Data.HashMap.Strict as Map
50-
import qualified Data.HashSet as Set
51-
import Development.IDE.Types.Exports
5252
import TcRnDriver (tcRnImportDecls)
5353
#endif
5454

0 commit comments

Comments
 (0)