[project @ 2001-08-21 09:25:48 by simonmar]
authorsimonmar <unknown>
Tue, 21 Aug 2001 09:25:48 +0000 (09:25 +0000)
committersimonmar <unknown>
Tue, 21 Aug 2001 09:25:48 +0000 (09:25 +0000)
Accept The Truth and disallow loading any home modules which don't
have a source file.

The reason is that the compilation manager can't figure out
dependencies unless it has the source file to browse through -
previously there was a half-hearted attempt to let you get away with
just an object + interface file, but it didn't work in general.
Better just to disallow it altogether.

Note that this applies to --make too.

ghc/compiler/compMan/CompManager.lhs

index 05c28e4..48145ee 100644 (file)
@@ -1093,14 +1093,7 @@ summarise mod location old_summary
    = do let hs_fn = unJust "summarise" (ml_hs_file location)
 
         case ml_hs_file location of {
-           Nothing -> do {
-               dflags <- getDynFlags;
-               when (verbosity dflags >= 1) $
-                   hPutStrLn stderr ("WARNING: module `" ++ 
-                       moduleUserString mod ++ "' has no source file.");
-               return Nothing;
-            };
-
+           Nothing -> noHsFileErr mod;
            Just src_fn -> do
 
         src_timestamp <- getModificationTime src_fn