[project @ 2000-04-04 01:19:07 by andy]
[ghc-hetmet.git] / ghc / interpreter / static.c
index 999e1e8..612a57e 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: static.c,v $
- * $Revision: 1.34 $
- * $Date: 2000/04/04 01:07:49 $
+ * $Revision: 1.35 $
+ * $Date: 2000/04/04 01:19:07 $
  * ------------------------------------------------------------------------*/
 
 #include "hugsbasictypes.h"
@@ -5026,6 +5026,7 @@ Void checkContext(void) {         /* Top level static check on Expr  */
 #endif
 
 Void checkDefns ( Module thisModule ) { /* Top level static analysis       */
+    Text modName = module(thisModule).text;
 
     staticAnalysis(RESET);
 
@@ -5035,21 +5036,18 @@ Void checkDefns ( Module thisModule ) { /* Top level static analysis       */
     mapProc(checkQualImport,  module(thisModule).qualImports);
     mapProc(checkUnqualImport,unqualImports);
     /* Add "import Prelude" if there`s no explicit import */
-#if 0
-    if (thisModule==modulePrelude || thisModule == modulePrelude2) {
+    if (modName == textPrimPrel || modName == textPrelude) {
       /* Nothing. */
     } else if (isNull(cellAssoc(modulePrelude,unqualImports))
               && isNull(cellRevAssoc(modulePrelude,module(thisModule).qualImports))) {
       unqualImports = cons(pair(modulePrelude,DOTDOT),unqualImports);
     } else {
-      /* Every module (including the Prelude) implicitly contains 
-       * "import qualified Prelude" 
+      /* Every module implicitly contains "import qualified Prelude" 
        */
       module(thisModule).qualImports
        =cons(pair(mkCon(textPrelude),modulePrelude),
              module(thisModule).qualImports);
     }
-#endif
     mapProc(checkImportList, unqualImports);
 
     /* Note: there's a lot of side-effecting going on here, so