[project @ 2000-11-14 15:04:15 by sewardj]
authorsewardj <unknown>
Tue, 14 Nov 2000 15:04:15 +0000 (15:04 +0000)
committersewardj <unknown>
Tue, 14 Nov 2000 15:04:15 +0000 (15:04 +0000)
Stop the world in the Approved Manner if the finder can't find a module.

ghc/compiler/compMan/CompManager.lhs

index a7d5ef9..61de1f9 100644 (file)
@@ -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]