@@ -41,7 +41,6 @@ module Development.IDE.Core.Rules(
41
41
loadGhcSession ,
42
42
getModIfaceFromDiskRule ,
43
43
getModIfaceRule ,
44
- getModIfaceWithoutLinkableRule ,
45
44
getModSummaryRule ,
46
45
isHiFileStableRule ,
47
46
getModuleGraphRule ,
@@ -688,13 +687,11 @@ loadGhcSession ghcSessionDepsConfig = do
688
687
689
688
data GhcSessionDepsConfig = GhcSessionDepsConfig
690
689
{ checkForImportCycles :: Bool
691
- , forceLinkables :: Bool
692
690
, fullModSummary :: Bool
693
691
}
694
692
instance Default GhcSessionDepsConfig where
695
693
def = GhcSessionDepsConfig
696
694
{ checkForImportCycles = True
697
- , forceLinkables = False
698
695
, fullModSummary = False
699
696
}
700
697
@@ -707,17 +704,12 @@ ghcSessionDepsDefinition GhcSessionDepsConfig{..} env file = do
707
704
Nothing -> return Nothing
708
705
Just deps -> do
709
706
when checkForImportCycles $ void $ uses_ ReportImportCycles deps
710
- ms : mss <- map msrModSummary <$> if fullModSummary
711
- then uses_ GetModSummary (file : deps)
712
- else uses_ GetModSummaryWithoutTimestamps (file : deps)
707
+ mss <- map msrModSummary <$> if fullModSummary
708
+ then uses_ GetModSummary deps
709
+ else uses_ GetModSummaryWithoutTimestamps deps
713
710
714
711
depSessions <- map hscEnv <$> uses_ GhcSessionDeps deps
715
- let uses_th_qq =
716
- xopt LangExt. TemplateHaskell dflags || xopt LangExt. QuasiQuotes dflags
717
- dflags = ms_hspp_opts ms
718
- ifaces <- if uses_th_qq || forceLinkables
719
- then uses_ GetModIface deps
720
- else uses_ GetModIfaceWithoutLinkable deps
712
+ ifaces <- uses_ GetModIface deps
721
713
722
714
let inLoadOrder = map hirHomeMod ifaces
723
715
session' <- liftIO $ mergeEnvs hsc mss inLoadOrder depSessions
@@ -882,13 +874,6 @@ getModIfaceRule = defineEarlyCutoff $ Rule $ \GetModIface f -> do
882
874
liftIO $ void $ modifyVar' compiledLinkables $ \ old -> extendModuleEnv old mod time
883
875
pure res
884
876
885
- getModIfaceWithoutLinkableRule :: Rules ()
886
- getModIfaceWithoutLinkableRule = defineEarlyCutoff $ RuleNoDiagnostics $ \ GetModIfaceWithoutLinkable f -> do
887
- mhfr <- use GetModIface f
888
- let mhfr' = fmap (\ x -> x{ hirHomeMod = (hirHomeMod x){ hm_linkable = Just (error msg) } }) mhfr
889
- msg = " tried to look at linkable for GetModIfaceWithoutLinkable for " ++ show f
890
- pure (hirIfaceFp <$> mhfr', mhfr')
891
-
892
877
-- | Also generates and indexes the `.hie` file, along with the `.o` file if needed
893
878
-- Invariant maintained is that if the `.hi` file was successfully written, then the
894
879
-- `.hie` and `.o` file (if needed) were also successfully written
@@ -1089,7 +1074,6 @@ mainRule RulesConfig{..} = do
1089
1074
getModIfaceFromDiskRule
1090
1075
getModIfaceFromDiskAndIndexRule
1091
1076
getModIfaceRule
1092
- getModIfaceWithoutLinkableRule
1093
1077
getModSummaryRule
1094
1078
isHiFileStableRule
1095
1079
getModuleGraphRule
0 commit comments