Don't use old linkable for hs-boot files.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Fri, 2 Oct 2015 21:13:03 +0000 (23:13 +0200)
committerBen Gamari <ben@smart-cactus.org>
Fri, 2 Oct 2015 21:13:04 +0000 (23:13 +0200)
We should only use the old linkable when the really is nothing
to be done.  In the case of hs-boot, there should just not be
a linkable.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1301

compiler/main/DriverPipeline.hs

index a45507e..9523e87 100644 (file)
@@ -224,7 +224,7 @@ compileOne' m_tc_result mHscMessage
                        do (iface, _changed, details) <- hscSimpleIface hsc_env tc_result mb_old_hash
                           return (HomeModInfo{ hm_details  = details,
                                                hm_iface    = iface,
-                                               hm_linkable = maybe_old_linkable })
+                                               hm_linkable = Nothing })
                    _ -> do guts0 <- hscDesugar hsc_env summary tc_result
                            guts <- hscSimplify hsc_env guts0
                            (iface, _changed, details, cgguts) <- hscNormalIface hsc_env guts mb_old_hash
@@ -255,7 +255,7 @@ compileOne' m_tc_result mHscMessage
                       when (gopt Opt_WriteInterface dflags) $
                          hscWriteIface dflags iface changed summary
                       let linkable = if isHsBoot src_flavour
-                                     then maybe_old_linkable
+                                     then Nothing
                                      else Just (LM (ms_hs_date summary) this_mod [])
                       return (HomeModInfo{ hm_details  = details,
                                            hm_iface    = iface,
@@ -273,7 +273,7 @@ compileOne' m_tc_result mHscMessage
                           return (HomeModInfo{
                                     hm_details  = details,
                                     hm_iface    = iface,
-                                    hm_linkable = maybe_old_linkable })
+                                    hm_linkable = Nothing })
 
                    HsSrcFile ->
                         do guts0 <- hscDesugar hsc_env summary tc_result