Skip to content

Commit d9b20ee

Browse files
committed
delete unused bits
1 parent b5f0e29 commit d9b20ee

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

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

-9
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ type instance RuleResult GetModIfaceFromDiskAndIndex = HiFileResult
252252
-- | Get a module interface details, either from an interface file or a typechecked module
253253
type instance RuleResult GetModIface = HiFileResult
254254

255-
-- | Get a module interface details, without the Linkable
256-
-- For better early cuttoff
257-
type instance RuleResult GetModIfaceWithoutLinkable = HiFileResult
258-
259255
-- | Get the contents of a file, either dirty (if the buffer is modified) or Nothing to mean use from disk.
260256
type instance RuleResult GetFileContents = (FileVersion, Maybe Text)
261257

@@ -430,11 +426,6 @@ data GetModIface = GetModIface
430426
instance Hashable GetModIface
431427
instance NFData GetModIface
432428

433-
data GetModIfaceWithoutLinkable = GetModIfaceWithoutLinkable
434-
deriving (Eq, Show, Typeable, Generic)
435-
instance Hashable GetModIfaceWithoutLinkable
436-
instance NFData GetModIfaceWithoutLinkable
437-
438429
data IsFileOfInterest = IsFileOfInterest
439430
deriving (Eq, Show, Typeable, Generic)
440431
instance Hashable IsFileOfInterest

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

+3-12
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ module Development.IDE.Core.Rules(
4141
loadGhcSession,
4242
getModIfaceFromDiskRule,
4343
getModIfaceRule,
44-
getModIfaceWithoutLinkableRule,
4544
getModSummaryRule,
4645
isHiFileStableRule,
4746
getModuleGraphRule,
@@ -705,9 +704,9 @@ ghcSessionDepsDefinition GhcSessionDepsConfig{..} env file = do
705704
Nothing -> return Nothing
706705
Just deps -> do
707706
when checkForImportCycles $ void $ uses_ ReportImportCycles deps
708-
ms:mss <- map msrModSummary <$> if fullModSummary
709-
then uses_ GetModSummary (file:deps)
710-
else uses_ GetModSummaryWithoutTimestamps (file:deps)
707+
mss <- map msrModSummary <$> if fullModSummary
708+
then uses_ GetModSummary deps
709+
else uses_ GetModSummaryWithoutTimestamps deps
711710

712711
depSessions <- map hscEnv <$> uses_ GhcSessionDeps deps
713712
ifaces <- uses_ GetModIface deps
@@ -875,13 +874,6 @@ getModIfaceRule = defineEarlyCutoff $ Rule $ \GetModIface f -> do
875874
liftIO $ void $ modifyVar' compiledLinkables $ \old -> extendModuleEnv old mod time
876875
pure res
877876

878-
getModIfaceWithoutLinkableRule :: Rules ()
879-
getModIfaceWithoutLinkableRule = defineEarlyCutoff $ RuleNoDiagnostics $ \GetModIfaceWithoutLinkable f -> do
880-
mhfr <- use GetModIface f
881-
let mhfr' = fmap (\x -> x{ hirHomeMod = (hirHomeMod x){ hm_linkable = Just (error msg) } }) mhfr
882-
msg = "tried to look at linkable for GetModIfaceWithoutLinkable for " ++ show f
883-
pure (hirIfaceFp <$> mhfr', mhfr')
884-
885877
-- | Also generates and indexes the `.hie` file, along with the `.o` file if needed
886878
-- Invariant maintained is that if the `.hi` file was successfully written, then the
887879
-- `.hie` and `.o` file (if needed) were also successfully written
@@ -1082,7 +1074,6 @@ mainRule RulesConfig{..} = do
10821074
getModIfaceFromDiskRule
10831075
getModIfaceFromDiskAndIndexRule
10841076
getModIfaceRule
1085-
getModIfaceWithoutLinkableRule
10861077
getModSummaryRule
10871078
isHiFileStableRule
10881079
getModuleGraphRule

0 commit comments

Comments
 (0)