From 107e369217896a2372209e4ea6493a0bf95ad0cd Mon Sep 17 00:00:00 2001
From: sewardj <unknown>
Date: Fri, 7 Jan 2000 15:31:12 +0000
Subject: [PATCH] [project @ 2000-01-07 15:31:12 by sewardj] finishGHCModule:
 correctly create export list entries for non-Names importEntity: allow TUPLE
 as a kind of TYCON (am dubious about this)

---
 ghc/interpreter/interface.c | 12 ++++++------
 ghc/interpreter/static.c    |  6 ++++--
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/ghc/interpreter/interface.c b/ghc/interpreter/interface.c
index bb3cc736bcdf..f3cb05c37792 100644
--- a/ghc/interpreter/interface.c
+++ b/ghc/interpreter/interface.c
@@ -7,8 +7,8 @@
  * Hugs version 1.4, December 1997
  *
  * $RCSfile: interface.c,v $
- * $Revision: 1.21 $
- * $Date: 2000/01/07 10:29:59 $
+ * $Revision: 1.22 $
+ * $Date: 2000/01/07 15:31:12 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -1066,7 +1066,7 @@ Void finishGHCModule ( Cell root )
                c = findQualTyconWithoutConsultingExportList ( q );
                if (isNull(c)) goto notfound;
                fprintf(stderr, "   type %s\n", textToStr(textOf(ex)) );
-               module(mod).exports = cons(c, module(mod).exports);
+               module(mod).exports = cons(pair(c,NIL), module(mod).exports);
                addTycon(c);
                break;
 
@@ -1087,7 +1087,7 @@ Void finishGHCModule ( Cell root )
                      original (defining) module.
 		  */
                   if (abstract) {
-                     module(mod).exports = cons(c, module(mod).exports);
+                     module(mod).exports = cons(pair(c,NIL), module(mod).exports);
                      addTycon(c);
                      fprintf ( stderr, "(abstract) ");
 		  } else {
@@ -1101,7 +1101,7 @@ Void finishGHCModule ( Cell root )
                         c = findQualNameWithoutConsultingExportList ( q );
                         fprintf(stderr, "%s ", textToStr(name(c).text));
                         assert(nonNull(c));
-                        module(mod).exports = cons(c, module(mod).exports);
+                        /* module(mod).exports = cons(c, module(mod).exports); */
                         addName(c);
                      }
                   }
@@ -1120,7 +1120,7 @@ Void finishGHCModule ( Cell root )
                      c = findQualNameWithoutConsultingExportList ( q );
                      fprintf(stderr, "%s ", textToStr(name(c).text));
                      if (isNull(c)) goto notfound;
-                     module(mod).exports = cons(c, module(mod).exports);
+                     /* module(mod).exports = cons(c, module(mod).exports); */
                      addName(c);
                   }
                   fprintf(stderr, "}\n" );
diff --git a/ghc/interpreter/static.c b/ghc/interpreter/static.c
index 1a20f20b92b0..dd7ee47a8ad9 100644
--- a/ghc/interpreter/static.c
+++ b/ghc/interpreter/static.c
@@ -9,8 +9,8 @@
  * included in the distribution.
  *
  * $RCSfile: static.c,v $
- * $Revision: 1.20 $
- * $Date: 1999/12/10 15:59:50 $
+ * $Revision: 1.21 $
+ * $Date: 2000/01/07 15:31:12 $
  * ------------------------------------------------------------------------*/
 
 #include "prelude.h"
@@ -469,6 +469,7 @@ Pair importSpec; {
     } else {
         imports = resolveImportList(m, impList);
     }
+
     for(; nonNull(imports); imports=tl(imports)) {
         Cell e = hd(imports);
         if (!cellIsMember(e,hidden))
@@ -485,6 +486,7 @@ Cell e; {
     switch (whatIs(e)) {
       case NAME  : importName(source,e); 
                    break;
+      case TUPLE:
       case TYCON : importTycon(source,e); 
                    break;
       case CLASS : importClass(source,e);
-- 
GitLab