summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Make.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Make.hs')
-rw-r--r--compiler/GHC/Driver/Make.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index 734608b471..720df3e2c8 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -2287,14 +2287,20 @@ downsweep hsc_env old_summaries excl_mods allow_dup_roots
old_summary_map = mkNodeMap old_summaries
getRootSummary :: Target -> IO (Either ErrorMessages ExtendedModSummary)
- getRootSummary (Target (TargetFile file mb_phase) obj_allowed maybe_buf)
+ getRootSummary Target { targetId = TargetFile file mb_phase
+ , targetAllowObjCode = obj_allowed
+ , targetContents = maybe_buf
+ }
= do exists <- liftIO $ doesFileExist file
if exists || isJust maybe_buf
then summariseFile hsc_env old_summaries file mb_phase
obj_allowed maybe_buf
else return $ Left $ unitBag $ mkPlainMsgEnvelope noSrcSpan $
text "can't find file:" <+> text file
- getRootSummary (Target (TargetModule modl) obj_allowed maybe_buf)
+ getRootSummary Target { targetId = TargetModule modl
+ , targetAllowObjCode = obj_allowed
+ , targetContents = maybe_buf
+ }
= do maybe_summary <- summariseModule hsc_env old_summary_map NotBoot
(L rootLoc modl) obj_allowed
maybe_buf excl_mods