[commit: ghc] master: Update assert to fix retc001 and retc002 (#9243) (bc604bd)

git at git.haskell.org git at git.haskell.org
Fri Jul 17 23:56:53 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bc604bdb0144010e8582caa6ea159ca0446c04f2/ghc

>---------------------------------------------------------------

commit bc604bdb0144010e8582caa6ea159ca0446c04f2
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Fri Jul 17 11:42:24 2015 +0200

    Update assert to fix retc001 and retc002 (#9243)
    
    Since 2223e196b2dc5340d70e58be011c279d381b4319, maybe_old_linkable can
    be Nothing even with an up-to-date interface file. This happens when
    compiling with --make -fno-code -fwrite-interface.
    
    See also Note [Recompilation checking when typechecking only] in
    GhcMake.hs.
    
    This fixes retc001 and retc002 when ghc_debugged.
    
    Differential Revision: https://phabricator.haskell.org/D1077


>---------------------------------------------------------------

bc604bdb0144010e8582caa6ea159ca0446c04f2
 compiler/main/DriverPipeline.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 3affcb1..ff6e81d 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -186,7 +186,7 @@ compileOne' m_tc_result mHscMessage
    case e of
        Left iface ->
            do details <- genModDetails hsc_env iface
-              MASSERT(isJust maybe_old_linkable)
+              MASSERT(isJust maybe_old_linkable || isNoLink (ghcLink dflags))
               return (HomeModInfo{ hm_details  = details,
                                    hm_iface    = iface,
                                    hm_linkable = maybe_old_linkable })



More information about the ghc-commits mailing list