From c4ea1371c0683bbd6e6c78d73435de369bb6c468 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Thu, 20 Dec 2007 16:43:07 +0000 Subject: [PATCH] Fix nasty recompilation bug in MkIface.computeChangedOccs MERGE to 6.8 branch In computeChangedOccs we look up the old version of a Name. But a WiredIn Name doesn't have an old version, because WiredIn things don't appear in interface files at all. Result: ghc-6.9: panic! (the 'impossible' happened) (GHC version 6.9 for x86_64-unknown-linux): lookupVers1 base:GHC.Prim chr#{v} This fixes the problem. The patch should merge easily onto the branch. --- compiler/iface/MkIface.lhs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index f972a91..1521069 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -708,6 +708,8 @@ computeChangedOccs ver_fn this_module old_usages eq_info -- return True if an external name has changed name_changed :: Name -> Bool name_changed nm + | isWiredInName nm -- Wired-in things don't get into interface + = False -- files and hence don't get into the ver_fn | Just ents <- lookupUFM usg_modmap (moduleName mod), Just v <- lookupUFM ents parent_occ = v < new_version -- 1.7.10.4