@@ -1039,10 +1039,9 @@ usePropertyByPathAction path plId p = do
1039
1039
getLinkableRule :: Recorder (WithPriority Log ) -> Rules ()
1040
1040
getLinkableRule recorder =
1041
1041
defineEarlyCutoff (cmapWithPrio LogShake recorder) $ Rule $ \ GetLinkable f -> do
1042
- ModSummaryResult {msrModSummary = ms} <- use_ GetModSummary f
1043
- HiFileResult {hirModIface, hirModDetails, hirCoreFp} <- use_ GetModIface f
1044
- let obj_file = ml_obj_file (ms_location ms)
1045
- core_file = ml_core_file (ms_location ms)
1042
+ HiFileResult {hirModSummary, hirModIface, hirModDetails, hirCoreFp} <- use_ GetModIface f
1043
+ let obj_file = ml_obj_file (ms_location hirModSummary)
1044
+ core_file = ml_core_file (ms_location hirModSummary)
1046
1045
case hirCoreFp of
1047
1046
Nothing -> error $ " called GetLinkable for a file without a linkable: " ++ show f
1048
1047
Just (bin_core, fileHash) -> do
@@ -1055,7 +1054,7 @@ getLinkableRule recorder =
1055
1054
core_t <- liftIO $ getModTime core_file
1056
1055
(warns, hmi) <- case linkableType of
1057
1056
-- Bytecode needs to be regenerated from the core file
1058
- BCOLinkable -> liftIO $ coreFileToLinkable linkableType (hscEnv session) ms hirModIface hirModDetails bin_core (posixSecondsToUTCTime core_t)
1057
+ BCOLinkable -> liftIO $ coreFileToLinkable linkableType (hscEnv session) hirModSummary hirModIface hirModDetails bin_core (posixSecondsToUTCTime core_t)
1059
1058
-- Object code can be read from the disk
1060
1059
ObjectLinkable -> do
1061
1060
-- object file is up to date if it is newer than the core file
@@ -1068,8 +1067,8 @@ getLinkableRule recorder =
1068
1067
else pure Nothing
1069
1068
case mobj_time of
1070
1069
Just obj_t
1071
- | obj_t >= core_t -> pure ([] , Just $ HomeModInfo hirModIface hirModDetails (justObjects $ LM (posixSecondsToUTCTime obj_t) (ms_mod ms ) [DotO obj_file]))
1072
- _ -> liftIO $ coreFileToLinkable linkableType (hscEnv session) ms hirModIface hirModDetails bin_core (error " object doesn't have time" )
1070
+ | obj_t >= core_t -> pure ([] , Just $ HomeModInfo hirModIface hirModDetails (justObjects $ LM (posixSecondsToUTCTime obj_t) (ms_mod hirModSummary ) [DotO obj_file]))
1071
+ _ -> liftIO $ coreFileToLinkable linkableType (hscEnv session) hirModSummary hirModIface hirModDetails bin_core (error " object doesn't have time" )
1073
1072
-- Record the linkable so we know not to unload it, and unload old versions
1074
1073
whenJust ((homeModInfoByteCode =<< hmi) <|> (homeModInfoObject =<< hmi)) $ \ (LM time mod _) -> do
1075
1074
compiledLinkables <- getCompiledLinkables <$> getIdeGlobalAction
0 commit comments