projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-09-25 11:56:33 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
main
/
DriverMkDepend.hs
diff --git
a/ghc/compiler/main/DriverMkDepend.hs
b/ghc/compiler/main/DriverMkDepend.hs
index
d1673ff
..
607ba78
100644
(file)
--- a/
ghc/compiler/main/DriverMkDepend.hs
+++ b/
ghc/compiler/main/DriverMkDepend.hs
@@
-1,5
+1,5
@@
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- $Id: DriverMkDepend.hs,v 1.16 2001/12/04 19:26:17 sof Exp $
+-- $Id: DriverMkDepend.hs,v 1.23 2002/09/18 10:51:01 simonmar Exp $
--
-- GHC Driver
--
--
-- GHC Driver
--
@@
-11,26
+11,28
@@
module DriverMkDepend where
#include "HsVersions.h"
#include "HsVersions.h"
-import DriverState
-import DriverUtil
+import DriverState
+import DriverUtil ( add, softGetDirectoryContents )
import DriverFlags
import SysTools ( newTempName )
import qualified SysTools
import DriverFlags
import SysTools ( newTempName )
import qualified SysTools
-import Module
-import Config
-import Module ( isHomeModule )
+import Module ( ModuleName, ModLocation(..),
+ moduleNameUserString, isHomeModule )
import Finder ( findModuleDep )
import Finder ( findModuleDep )
-import HscTypes ( ModuleLocation(..) )
-import Util
+import Util ( global )
import Panic
import Panic
-import IOExts
-import Exception
+import DATA_IOREF ( IORef, newIORef, readIORef, writeIORef )
+import EXCEPTION
import Directory
import IO
import Directory
import IO
-import Monad
-import Maybe
+import Monad ( when )
+import Maybe ( isJust )
+
+#if __GLASGOW_HASKELL__ <= 408
+import Panic ( catchJust, ioErrors )
+#endif
-------------------------------------------------------------------------------
-- mkdependHS
-------------------------------------------------------------------------------
-- mkdependHS
@@
-38,7
+40,7
@@
import Maybe
-- flags
GLOBAL_VAR(v_Dep_makefile, "Makefile", String);
GLOBAL_VAR(v_Dep_include_prelude, False, Bool);
-- flags
GLOBAL_VAR(v_Dep_makefile, "Makefile", String);
GLOBAL_VAR(v_Dep_include_prelude, False, Bool);
-GLOBAL_VAR(v_Dep_exclude_mods, [], [String]);
+GLOBAL_VAR(v_Dep_exclude_mods, ["GHC.Prim"], [String]);
GLOBAL_VAR(v_Dep_suffixes, [], [String]);
GLOBAL_VAR(v_Dep_warnings, True, Bool);
GLOBAL_VAR(v_Dep_suffixes, [], [String]);
GLOBAL_VAR(v_Dep_warnings, True, Bool);
@@
-174,7
+176,8
@@
findDependency is_source src imp = do
Just (mod,loc)
| isHomeModule mod || include_prelude
-> return (Just (ml_hi_file loc, not is_source))
Just (mod,loc)
| isHomeModule mod || include_prelude
-> return (Just (ml_hi_file loc, not is_source))
- | otherwise
+ | otherwise
-> return Nothing
Nothing -> throwDyn (ProgramError
-> return Nothing
Nothing -> throwDyn (ProgramError
- (src ++ ": " ++ "can't locate import `" ++ imp_mod ++ "'"))
+ (src ++ ": " ++ "can't locate import `" ++ imp_mod ++ "'" ++
+ if is_source then " (SOURCE import)" else ""))