Skip to content

Commit a747f5b

Browse files
committed
Reduce nesting of ifdefs in hscCompileCoreHook
1 parent e139e37 commit a747f5b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

+2-7
Original file line numberDiff line numberDiff line change
@@ -306,19 +306,14 @@ captureSplicesAndDeps TypecheckHelpers{..} env k = do
306306
[homeUnitId_ dflags]
307307
#endif
308308
mods_transitive = getTransitiveMods hsc_env needed_mods
309+
309310
-- If we don't support multiple home units, ModuleNames are sufficient because all the units will be the same
310311
mods_transitive_list =
311312
#if MIN_VERSION_ghc(9,3,0)
312313
mapMaybe nodeKeyToInstalledModule $ Set.toList mods_transitive
313314
#else
314-
map
315-
#if MIN_VERSION_ghc(9,0,0)
316-
(mkModule (homeUnitId_ dflags))
317-
#else
318-
(InstalledModule (toInstalledUnitId $ homeUnitId_ dflags))
319-
#endif
320315
-- Non det OK as we will put it into maps later anyway
321-
$ nonDetEltsUniqSet mods_transitive
316+
map (Compat.installedModule (homeUnitId_ dflags)) $ nonDetEltsUniqSet mods_transitive
322317
#endif
323318

324319
#if MIN_VERSION_ghc(9,3,0)

0 commit comments

Comments
 (0)