[project @ 2000-04-04 01:19:07 by andy]
authorandy <unknown>
Tue, 4 Apr 2000 01:19:07 +0000 (01:19 +0000)
committerandy <unknown>
Tue, 4 Apr 2000 01:19:07 +0000 (01:19 +0000)
Making expressions inport Prelude, not PrimPrel,
fixing the implicit import Prelude back to the Haskell semantics.

ghc/interpreter/hugs.c
ghc/interpreter/static.c

index 7a365b6..f8bb63e 100644 (file)
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: hugs.c,v $
- * $Revision: 1.53 $
- * $Date: 2000/04/04 01:07:49 $
+ * $Revision: 1.54 $
+ * $Date: 2000/04/04 01:19:07 $
  * ------------------------------------------------------------------------*/
 
 #include <setjmp.h>
@@ -1686,7 +1686,7 @@ static Module allocEvalModule ( void )
    module(evalMod).tycons  = module(currentModule).tycons;
    module(evalMod).classes = module(currentModule).classes;
    module(evalMod).qualImports 
-     = singleton(pair(mkCon(textPrelude),modulePrimPrel)); /* AJG Back to Prelude */
+     = singleton(pair(mkCon(textPrelude),modulePrelude));
    return evalMod;
 }
 
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