From: simonpj@microsoft.com Date: Wed, 22 Nov 2006 17:34:15 +0000 (+0000) Subject: Improve recovery in hptRules X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=78bfe2ad25ff34cefa14e7f11093923f5d1e940f;p=ghc-hetmet.git Improve recovery in hptRules --- diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index a0e4857..e6e8e4c 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -295,12 +295,15 @@ hptRules hsc_env deps , mod /= moduleName gHC_PRIM -- Look it up in the HPT - , let mod_info = case lookupUFM hpt mod of - Nothing -> pprPanic "hptRules" (ppr mod <+> ppr deps) - Just x -> x + , let rules = case lookupUFM hpt mod of + Just info -> md_rules (hm_details info) + Nothing -> pprTrace "WARNING in hptRules" msg [] + msg = vcat [ptext SLIT("missing module") <+> ppr mod, + ptext SLIT("Probable cause: out-of-date interface files")] + -- This really shouldn't happen, but see Trac #962 -- And get its dfuns - , rule <- md_rules (hm_details mod_info) ] + , rule <- rules ] \end{code} %************************************************************************