From 41fd413684f4dba0259fefffa41c9c9eac2f629a Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Thu, 27 Nov 2008 13:57:25 +0000 Subject: [PATCH] Improve error message for #2739 (but no fix). This patch changes 'loadModule' to define a fake linkable. The previous implementation of providing no linkable at all violated a pre-condition in the ByteCode linker. This doesn't fix #2739, but it improves the error message a bit. --- compiler/main/GHC.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 08ae664..8ac38ae 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -1099,7 +1099,9 @@ loadModule tcm = do let mod_info = HomeModInfo { hm_iface = iface, hm_details = details, - hm_linkable = Nothing } + hm_linkable = Just (LM (ms_hs_date ms) + (ms_mod ms) + []) } hsc_env <- getSession return $ addToUFM (hsc_HPT hsc_env) mod mod_info modifySession $ \e -> e{ hsc_HPT = hpt_new } -- 1.7.10.4