Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for GHC 9.0 #3875

Merged
merged 13 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8", "9.0.2"]
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8"]
platform: [ { image: "debian:9"
, installCmd: "sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && sed -i /-updates/d /etc/apt/sources.list && apt-get update && apt-get install -y"
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
Expand Down Expand Up @@ -118,15 +118,6 @@ jobs:
# Perhaps we can migrate *all* unknown linux builds to a uniform
# image.
include:
- ghc: 9.0.2
platform:
{ image: "rockylinux:8"
, installCmd: "yum -y install epel-release && yum install -y --allowerasing"
, toolRequirements: "autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
, DISTRO: "Unknown"
, ARTIFACT: "x86_64-linux-unknown"
, ADD_CABAL_ARGS: "--enable-split-sections"
}
- ghc: 9.2.8
platform:
{ image: "rockylinux:8"
Expand Down Expand Up @@ -222,7 +213,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8", "9.0.2"]
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8" ]
steps:
- uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
Expand Down Expand Up @@ -282,7 +273,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8", "9.0.2"]
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -372,7 +363,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8", "9.0.2"]
ghc: ["9.8.1", "9.6.3", "9.4.7", "9.2.8"]
steps:
- name: install windows deps
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supported-ghc-versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[ "9.8", "9.6", "9.4" , "9.2" , "9.0" ]
[ "9.8", "9.6", "9.4" , "9.2" ]
2 changes: 1 addition & 1 deletion docs/support/ghc-version-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Support status (see the support policy below for more details):
| 9.2.(5,6) | [1.9.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.9.1.0) | deprecated |
| 9.2.(3,4) | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | deprecated |
| 9.2.(1,2) | [1.7.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.7.0.0) | deprecated |
| 9.0.2 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
| 9.0.2 | [2.4.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.4.0.0) | deprecated |
| 9.0.1 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
| 8.10.7 | [2.2.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.2.0.0) | deprecated |
| 8.10.6 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
Expand Down
2 changes: 1 addition & 1 deletion docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-ormolu-plugin` | 2 | 9.8 |
| `hls-rename-plugin` | 2 | 9.8 |
| `hls-stylish-haskell-plugin` | 2 | 9.8 |
| `hls-overloaded-record-dot-plugin` | 2 | 9.0 |
| `hls-overloaded-record-dot-plugin` | 2 | |
| `hls-floskell-plugin` | 3 | 9.6, 9.8 |
| `hls-stan-plugin` | 3 | 9.2.(4-8) |
| `hls-retrie-plugin` | 3 | 9.8 |
Expand Down
10 changes: 0 additions & 10 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ source-repository head
type: git
location: https://github.com/haskell/haskell-language-server.git

flag ghc-patched-unboxed-bytecode
description:
The GHC version we link against supports unboxed sums and tuples in bytecode

default: False
manual: True

flag ekg
description:
Enable EKG monitoring of the build graph and other metrics on port 8999
Expand Down Expand Up @@ -232,9 +225,6 @@ library
-Wall -Wincomplete-uni-patterns -Wno-unticked-promoted-constructors
-Wunused-packages -fno-ignore-asserts

if flag(ghc-patched-unboxed-bytecode)
cpp-options: -DGHC_PATCHED_UNBOXED_BYTECODE

if flag(pedantic)
-- We eventually want to build with Werror fully, but we haven't
-- finished purging the warnings, so some are set to not be errors
Expand Down
7 changes: 2 additions & 5 deletions ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
import Data.Hashable hiding (hash)
import qualified Data.HashMap.Strict as HM
import Data.List
import Data.List.NonEmpty (NonEmpty (..))
import qualified Data.List.NonEmpty as NE
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.Map.Strict as Map
import Data.Maybe
import Data.Proxy
Expand Down Expand Up @@ -618,7 +618,7 @@
void $ modifyVar' fileToFlags $
Map.insert hieYaml (HM.fromList (concatMap toFlagsMap all_targets))
void $ modifyVar' filesMap $
flip HM.union (HM.fromList (zip (map fst $ concatMap toFlagsMap all_targets) (repeat hieYaml)))

Check warning on line 621 in ghcide/session-loader/Development/IDE/Session.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Warning in loadSessionWithOptions in module Development.IDE.Session: Use map ▫︎ Found: "zip (map fst $ concatMap toFlagsMap all_targets) (repeat hieYaml)" ▫︎ Perhaps: "map (, hieYaml) (map fst $ concatMap toFlagsMap all_targets)" ▫︎ Note: may require `{-# LANGUAGE TupleSections #-}` adding to the top of the file

void $ extendKnownTargets all_targets

Expand Down Expand Up @@ -826,7 +826,7 @@
#if MIN_VERSION_ghc(9,3,0)
-- Set up a multi component session with the other units on GHC 9.4
Compat.initUnits (map snd uids) (hscSetFlags df hsc_env)
#elif MIN_VERSION_ghc(9,2,0)
#else
-- This initializes the units for GHC 9.2
-- Add the options for the current component to the HscEnv
-- We want to call `setSessionDynFlags` instead of `hscSetFlags`
Expand All @@ -835,11 +835,8 @@
-- to be visible.
-- See #2693
evalGhcEnv hsc_env $ do
_ <- setSessionDynFlags $ df

Check warning on line 838 in ghcide/session-loader/Development/IDE/Session.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Suggestion in newComponentCache in module Development.IDE.Session: Redundant $ ▫︎ Found: "setSessionDynFlags $ df" ▫︎ Perhaps: "setSessionDynFlags df"
getSession
#else
-- getOptions is enough to initialize units on GHC <9.2
pure $ hscSetFlags df hsc_env { hsc_IC = (hsc_IC hsc_env) { ic_dflags = df } }
#endif

let newFunc = maybe newHscEnvEqPreserveImportPaths newHscEnvEq cradlePath
Expand Down
41 changes: 5 additions & 36 deletions ghcide/src/Development/IDE/Core/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
import Data.Tuple.Extra (dupe)
import Data.Unique as Unique
import Debug.Trace
import Development.IDE.Core.FileStore (resetInterfaceStore)

Check warning on line 76 in ghcide/src/Development/IDE/Core/Compile.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Warning in module Development.IDE.Core.Compile: Use fewer imports ▫︎ Found: "import Development.IDE.Core.FileStore ( resetInterfaceStore )\nimport Development.IDE.Core.FileStore ( shareFilePath )\n" ▫︎ Perhaps: "import Development.IDE.Core.FileStore\n ( resetInterfaceStore, shareFilePath )\n"
import Development.IDE.Core.Preprocessor
import Development.IDE.Core.RuleTypes
import Development.IDE.Core.Shake
Expand All @@ -92,7 +92,7 @@
import Development.IDE.Types.Diagnostics
import Development.IDE.Types.Location
import Development.IDE.Types.Options
import GHC (ForeignHValue,

Check warning on line 95 in ghcide/src/Development/IDE/Core/Compile.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Warning in module Development.IDE.Core.Compile: Use fewer imports ▫︎ Found: "import GHC ( ForeignHValue, GetDocsFailure(..), parsedSource )\nimport qualified GHC as G\nimport GHC ( ModuleGraph )\nimport GHC ( GhcException(..) )\n" ▫︎ Perhaps: "import qualified GHC as G\nimport GHC\n ( ForeignHValue,\n GetDocsFailure(..),\n parsedSource,\n ModuleGraph,\n GhcException(..) )\n"
GetDocsFailure (..),
parsedSource)
import qualified GHC.LanguageExtensions as LangExt
Expand All @@ -110,27 +110,17 @@

import GHC.Tc.Gen.Splice

#if !MIN_VERSION_ghc(9,2,1)
import GHC.Driver.Types
#endif

#if !MIN_VERSION_ghc(9,2,0)
import qualified Data.IntMap.Strict as IntMap
#endif

#if MIN_VERSION_ghc(9,2,0)
import qualified GHC as G
#endif

#if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0)
#if !MIN_VERSION_ghc(9,3,0)
import GHC (ModuleGraph)
#endif

#if MIN_VERSION_ghc(9,2,1)
import GHC.Types.ForeignStubs
import GHC.Types.HpcInfo
import GHC.Types.TypeEnv
#endif

#if !MIN_VERSION_ghc(9,3,0)
import Data.Map (Map)
Expand Down Expand Up @@ -265,7 +255,6 @@
; lintInteractiveExpr "hscCompileExpr" hsc_env prepd_expr


#if MIN_VERSION_ghc(9,2,0)
; let iNTERACTIVELoc = G.ModLocation{ ml_hs_file = Nothing,
ml_hi_file = panic "hscCompileCoreExpr':ml_hi_file",
ml_obj_file = panic "hscCompileCoreExpr':ml_obj_file",
Expand Down Expand Up @@ -293,11 +282,6 @@
(icInteractiveModule ictxt)
stg_expr
[] Nothing
#else
{- Convert to BCOs -}
; bcos <- coreExprToBCOs hsc_env
(icInteractiveModule (hsc_IC hsc_env)) prepd_expr
#endif

-- Exclude wired-in names because we may not have read
-- their interface files, so getLinkDeps will fail
Expand All @@ -305,18 +289,14 @@
-- by default, so we can safely ignore them here.

-- Find the linkables for the modules we need
; let needed_mods = mkUniqSet [

Check warning on line 292 in ghcide/src/Development/IDE/Core/Compile.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Suggestion in captureSplicesAndDeps in module Development.IDE.Core.Compile: Move guards forward ▫︎ Found: "[moduleName mod |\n n <- concatMap (uniqDSetToList . bcoFreeNames) $ bc_bcos bcos,\n Just mod <- [nameModule_maybe n],\n not (isWiredInName n),\n moduleUnitId mod `elem` home_unit_ids]" ▫︎ Perhaps: "[moduleName mod |\n n <- concatMap (uniqDSetToList . bcoFreeNames) $ bc_bcos bcos,\n not (isWiredInName n),\n Just mod <- [nameModule_maybe n],\n moduleUnitId mod `elem` home_unit_ids]"
#if MIN_VERSION_ghc(9,3,0)
mod -- We need the whole module for 9.4 because of multiple home units modules may have different unit ids
#else
moduleName mod -- On <= 9.2, just the name is enough because all unit ids will be the same
#endif

#if MIN_VERSION_ghc(9,2,0)
| n <- concatMap (uniqDSetToList . bcoFreeNames) $ bc_bcos bcos
#else
| n <- uniqDSetToList (bcoFreeNames bcos)
#endif
, Just mod <- [nameModule_maybe n] -- Names from other modules
, not (isWiredInName n) -- Exclude wired-in names
, moduleUnitId mod `elem` home_unit_ids -- Only care about stuff from the home package set
Expand Down Expand Up @@ -357,13 +337,10 @@
{- load it -}
; (fv_hvs, lbss, pkgs) <- loadDecls (hscInterp hsc_env') hsc_env' srcspan bcos
; let hval = ((expectJust "hscCompileCoreExpr'" $ lookup (idName binding_id) fv_hvs), lbss, pkgs)
#elif MIN_VERSION_ghc(9,2,0)
#else
{- load it -}
; fv_hvs <- loadDecls (hscInterp hsc_env') hsc_env' srcspan bcos
; let hval = (expectJust "hscCompileCoreExpr'" $ lookup (idName binding_id) fv_hvs)

Check warning on line 343 in ghcide/src/Development/IDE/Core/Compile.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Suggestion in captureSplicesAndDeps in module Development.IDE.Core.Compile: Redundant bracket ▫︎ Found: "do let dflags = hsc_dflags hsc_env\n simpl_expr <- simplifyExpr dflags hsc_env ds_expr\n let tidy_expr = tidyExpr emptyTidyEnv simpl_expr\n prepd_expr <- corePrepExpr dflags hsc_env tidy_expr\n lintInteractiveExpr \"hscCompileExpr\" hsc_env prepd_expr\n let iNTERACTIVELoc\n = G.ModLocation\n {ml_hs_file = Nothing,\n ml_hi_file = panic \"hscCompileCoreExpr':ml_hi_file\",\n ml_obj_file = panic \"hscCompileCoreExpr':ml_obj_file\",\n ml_hie_file = panic \"hscCompileCoreExpr':ml_hie_file\"}\n let ictxt = hsc_IC hsc_env\n (binding_id, stg_expr, _, _) <- myCoreToStgExpr\n (hsc_logger hsc_env) (hsc_dflags hsc_env) ictxt\n (icInteractiveModule ictxt) iNTERACTIVELoc prepd_expr\n bcos <- byteCodeGen\n hsc_env (icInteractiveModule ictxt) stg_expr [] Nothing\n let needed_mods\n = mkUniqSet\n [moduleName mod |\n n <- concatMap (uniqDSetToList . bcoFreeNames) $ bc_bcos bcos,\n Just mod <- [nameModule_maybe n],\n not (isWiredInName n),\n moduleUnitId mod `elem` home_unit_ids]\n home_unit_ids = [homeUnitId_ dflags]\n mods_transitive = getTransitiveMods hsc_env needed_mods\n mods_transitive_list\n = map (Compat.installedModule (homeUnitId_ dflags))\n $ nonDetEltsUniqSet mods_transitive\n moduleLocs <- readIORef (hsc_FC hsc_env)\n lbs <- getLinkables\n [toNormalizedFilePath' file |\n installedMod <- mods_transitive_list,\n let ifr\n = fromJust $ lookupInstalledModuleEnv moduleLocs installedMod\n file\n = case ifr of\n InstalledFound loc _ -> fromJust $ ml_hs_file loc\n _ -> panic \"hscCompileCoreExprHook: module not found\"]\n let hsc_env' = loadModulesHome (map linkableHomeMod lbs) hsc_env\n fv_hvs <- loadDecls (hscInterp hsc_env') hsc_env' srcspan bcos\n let hval\n = (expectJust \"hscCompileCoreExpr'\"\n $ lookup (idName binding_id) fv_hvs)\n modifyIORef'\n var\n (flip\n extendModuleEnvList\n [(mi_module $ hm_iface hm, linkableHash lb) |\n lb <- lbs, let hm = linkableHomeMod lb])\n return hval" ▫︎ Perhaps: "do let dflags = hsc_dflags hsc_env\n simpl_expr <- simplifyExpr dflags hsc_env ds_expr\n let tidy_expr = tidyExpr emptyTidyEnv simpl_expr\n prepd_expr <- corePrepExpr dflags hsc_env tidy_expr\n lintInteractiveExpr \"hscCompileExpr\" hsc_env prepd_expr\n let iNTERACTIVELoc\n = G.ModLocation\n {ml_hs_file = Nothing,\n ml_hi_file = panic \"hscCompileCoreExpr':ml_hi_file\",\n ml_obj_file = panic \"hscCompileCoreExpr':ml_obj_file\",\n ml_hie_file = panic \"hscCompileCoreExpr':ml_hie_file\"}\n let ictxt = hsc_IC hsc_env\n (binding_id, stg_expr, _, _) <- myCoreToStgExpr\n (hsc_logger hsc_env) (hsc_dflags hsc_env) ictxt\n (icInteractiveModule ictxt) iNTERACTIVELoc prepd_expr\n bcos <- byteCodeGen\n hsc_env (icInteractiveModule ictxt) stg_expr [] Nothing\n let needed_mods\n = mkUniqSet\n [moduleName mod |\n n <- concatMap (uniqDSetToList . bcoFreeNames) $ bc_bcos bcos,\n Just mod <- [nameModule_maybe n],\n not (isWiredInName n),\n moduleUnitId mod `elem` home_unit_ids]\n home_unit_ids = [homeUnitId_ dflags]\n mods_transitive = getTransitiveMods hsc_env needed_mods\n mods_transitive_list\n = map (Compat.installedModule (homeUnitId_ dflags))\n $ nonDetEltsUniqSet mods_transitive\n moduleLocs <- readIORef (hsc_FC hsc_env)\n lbs <- getLinkables\n [toNormalizedFilePath' file |\n installedMod <- mods_transitive_list,\n let ifr\n = fromJust $ lookupInstalledModuleEnv moduleLocs installedMod\n file\n = case ifr of\n InstalledFound loc _ -> fromJust $ ml_hs_file loc\n _ -> panic \"hscCompileCoreExprHook: module not found\"]\n let hsc_env' = loadModulesHome (map linkableHomeMod lbs) hsc_env\n fv_hvs <- loadDecls (hscInterp hsc_env') hsc_env' srcspan bcos\n let hval\n = expectJust \"hscCompileCoreExpr'\"\n $ lookup (idName binding_id) fv_hvs\n modifyIORef'\n var\n (flip\n extendModuleEnvList\n [(mi_module $ hm_iface hm, linkableHash lb) |\n lb <- lbs, let hm = linkableHomeMod lb])\n return hval"
#else
{- link it -}
; hval <- linkExpr hsc_env' srcspan bcos
#endif

; modifyIORef' var (flip extendModuleEnvList [(mi_module $ hm_iface hm, linkableHash lb) | lb <- lbs, let hm = linkableHomeMod lb])
Expand Down Expand Up @@ -618,7 +595,7 @@
-- SYB is slow but fine given that this is only used for testing
noUnfoldings = everywhere $ mkT $ \v -> if isId v
then
let v' = if isOtherUnfolding (realIdUnfolding v) then (setIdUnfolding v noUnfolding) else v

Check warning on line 598 in ghcide/src/Development/IDE/Core/Compile.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Suggestion in mkHiFileResultCompile in module Development.IDE.Core.Compile: Redundant bracket ▫︎ Found: "if isOtherUnfolding (realIdUnfolding v) then\n (setIdUnfolding v noUnfolding)\nelse\n v" ▫︎ Perhaps: "if isOtherUnfolding (realIdUnfolding v) then\n setIdUnfolding v noUnfolding\nelse\n v"
in setIdOccInfo v' noOccInfo
else v
isOtherUnfolding (OtherCon _) = True
Expand Down Expand Up @@ -881,7 +858,7 @@
where
dflags = hsc_dflags hscEnv
run _ts = -- ts is only used in GHC 9.2
#if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0)
#if !MIN_VERSION_ghc(9,3,0)
fmap (join . snd) . liftIO . initDs hscEnv _ts
#else
id
Expand Down Expand Up @@ -1189,15 +1166,15 @@


convImport (L _ i) = (
#if !MIN_VERSION_ghc (9,3,0)
#if !MIN_VERSION_ghc(9,3,0)
fmap sl_fs
#endif
(ideclPkgQual i)
, reLoc $ ideclName i)

msrImports = implicit_imports ++ imps

#if MIN_VERSION_ghc (9,3,0)
#if MIN_VERSION_ghc(9,3,0)
rn_pkg_qual = renameRawPkgQual (hsc_unit_env ppEnv)
rn_imps = fmap (\(pk, lmn@(L _ mn)) -> (rn_pkg_qual mn pk, lmn))
srcImports = rn_imps $ map convImport src_idecls
Expand Down Expand Up @@ -1714,9 +1691,6 @@
#else
Map.lookup name dmap ,
#endif
#if !MIN_VERSION_ghc(9,2,0)
IntMap.fromAscList $ Map.toAscList $
#endif
#if MIN_VERSION_ghc(9,3,0)
lookupWithDefaultUniqMap amap mempty name))
#else
Expand All @@ -1739,12 +1713,7 @@
lookupName _ name
| Nothing <- nameModule_maybe name = pure Nothing
lookupName hsc_env name = exceptionHandle $ do
#if MIN_VERSION_ghc(9,2,0)
mb_thing <- liftIO $ lookupType hsc_env name
#else
eps <- liftIO $ readIORef (hsc_EPS hsc_env)
let mb_thing = lookupType (hsc_dflags hsc_env) (hsc_HPT hsc_env) (eps_PTE eps) name
#endif
case mb_thing of
x@(Just _) -> return x
Nothing
Expand Down
9 changes: 0 additions & 9 deletions ghcide/src/Development/IDE/Core/Rules.hs
Original file line number Diff line number Diff line change
Expand Up @@ -697,12 +697,10 @@ dependencyInfoForFiles fs = do
mg = mkModuleGraph mns
#else
let mg = mkModuleGraph $
#if MIN_VERSION_ghc(9,2,0)
-- We don't do any instantiation for backpack at this point of time, so it is OK to use
-- 'extendModSummaryNoDeps'.
-- This may have to change in the future.
map extendModSummaryNoDeps $
#endif
(catMaybes mss)
#endif
pure (fingerprintToBS $ Util.fingerprintFingerprints $ map (maybe fingerprint0 msrFingerprint) msrs, processDependencyInformation rawDepInfo bm mg)
Expand Down Expand Up @@ -822,12 +820,10 @@ ghcSessionDepsDefinition fullModSummary GhcSessionDepsConfig{..} env file = do
nubOrdOn mkNodeKey (ModuleNode final_deps ms : concatMap mgModSummaries' mgs)
#else
let module_graph_nodes =
#if MIN_VERSION_ghc(9,2,0)
-- We don't do any instantiation for backpack at this point of time, so it is OK to use
-- 'extendModSummaryNoDeps'.
-- This may have to change in the future.
map extendModSummaryNoDeps $
#endif
nubOrdOn ms_mod (ms : concatMap mgModSummaries mgs)
#endif
liftIO $ evaluate $ liftRnf rwhnf module_graph_nodes
Expand Down Expand Up @@ -1219,12 +1215,7 @@ uses_th_qq (ms_hspp_opts -> dflags) =
-- Depends on whether it uses unboxed tuples or sums
computeLinkableTypeForDynFlags :: DynFlags -> LinkableType
computeLinkableTypeForDynFlags d
#if defined(GHC_PATCHED_UNBOXED_BYTECODE) || MIN_VERSION_ghc(9,2,0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this flag from the cabal file?

= BCOLinkable
#else
| _unboxed_tuples_or_sums = ObjectLinkable
| otherwise = BCOLinkable
#endif
where -- unboxed_tuples_or_sums is only used in GHC < 9.2
_unboxed_tuples_or_sums =
xopt LangExt.UnboxedTuples d || xopt LangExt.UnboxedSums d
Expand Down
4 changes: 0 additions & 4 deletions ghcide/src/Development/IDE/GHC/CPP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,5 @@ doCpp env input_fn output_fn =
let cpp_opts = True in
#endif

#if MIN_VERSION_ghc(9,2,0)
Pipeline.doCpp (hsc_logger env) (hsc_tmpfs env) (hsc_dflags env) (hsc_unit_env env) cpp_opts input_fn output_fn
#else
Pipeline.doCpp (hsc_dflags env) cpp_opts input_fn output_fn
#endif

Loading
Loading