From: sewardj Date: Tue, 14 Nov 2000 15:04:15 +0000 (+0000) Subject: [project @ 2000-11-14 15:04:15 by sewardj] X-Git-Tag: Approximately_9120_patches~3341 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7507153eeabfc61788a2aaf1f069b4e34668c27e;p=ghc-hetmet.git [project @ 2000-11-14 15:04:15 by sewardj] Stop the world in the Approved Manner if the finder can't find a module. --- 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]