@@ -41,7 +41,6 @@ module Development.IDE.Core.Rules(
4141 loadGhcSession ,
4242 getModIfaceFromDiskRule ,
4343 getModIfaceRule ,
44- getModIfaceWithoutLinkableRule ,
4544 getModSummaryRule ,
4645 isHiFileStableRule ,
4746 getModuleGraphRule ,
@@ -688,13 +687,11 @@ loadGhcSession ghcSessionDepsConfig = do
688687
689688data GhcSessionDepsConfig = GhcSessionDepsConfig
690689 { checkForImportCycles :: Bool
691- , forceLinkables :: Bool
692690 , fullModSummary :: Bool
693691 }
694692instance Default GhcSessionDepsConfig where
695693 def = GhcSessionDepsConfig
696694 { checkForImportCycles = True
697- , forceLinkables = False
698695 , fullModSummary = False
699696 }
700697
@@ -707,17 +704,12 @@ ghcSessionDepsDefinition GhcSessionDepsConfig{..} env file = do
707704 Nothing -> return Nothing
708705 Just deps -> do
709706 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
713710
714711 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
721713
722714 let inLoadOrder = map hirHomeMod ifaces
723715 session' <- liftIO $ mergeEnvs hsc mss inLoadOrder depSessions
@@ -882,13 +874,6 @@ getModIfaceRule = defineEarlyCutoff $ Rule $ \GetModIface f -> do
882874 liftIO $ void $ modifyVar' compiledLinkables $ \ old -> extendModuleEnv old mod time
883875 pure res
884876
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-
892877-- | Also generates and indexes the `.hie` file, along with the `.o` file if needed
893878-- Invariant maintained is that if the `.hi` file was successfully written, then the
894879-- `.hie` and `.o` file (if needed) were also successfully written
@@ -1089,7 +1074,6 @@ mainRule RulesConfig{..} = do
10891074 getModIfaceFromDiskRule
10901075 getModIfaceFromDiskAndIndexRule
10911076 getModIfaceRule
1092- getModIfaceWithoutLinkableRule
10931077 getModSummaryRule
10941078 isHiFileStableRule
10951079 getModuleGraphRule
0 commit comments