From 7507153eeabfc61788a2aaf1f069b4e34668c27e Mon Sep 17 00:00:00 2001 From: sewardj Date: Tue, 14 Nov 2000 15:04:15 +0000 Subject: [PATCH] [project @ 2000-11-14 15:04:15 by sewardj] Stop the world in the Approved Manner if the finder can't find a module. --- ghc/compiler/compMan/CompManager.lhs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/compMan/CompManager.lhs b/ghc/compiler/compMan/CompManager.lhs index a7d5ef9..61de1f9 100644 --- a/ghc/compiler/compMan/CompManager.lhs +++ b/ghc/compiler/compMan/CompManager.lhs @@ -40,6 +40,8 @@ import HscMain ( initPersistentCompilerState ) import Finder ( findModule, emptyHomeDirCache ) import BasicTypes ( GhciMode(..) ) import Util ( unJust ) +import DriverUtil ( BarfKind(..) ) +import Exception ( throwDyn ) \end{code} @@ -509,8 +511,10 @@ downsweep rootNm = do found <- findModule nm case found of Just (mod, location) -> summarise preprocess mod location - Nothing -> panic ("CompManager: can't find module `" ++ - showSDoc (ppr nm) ++ "'") + Nothing -> throwDyn (OtherError + ("ghc --make: no signs of life for module `" + ++ showSDoc (ppr nm) ++ "'")) + -- loop invariant: homeSummaries doesn't contain package modules loop :: [ModSummary] -> IO [ModSummary] -- 1.7.10.4