Commit 107e3692 authored by sewardj's avatar sewardj
Browse files

[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)
parent 9ac5c76c
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
* Hugs version 1.4, December 1997 * Hugs version 1.4, December 1997
* *
* $RCSfile: interface.c,v $ * $RCSfile: interface.c,v $
* $Revision: 1.21 $ * $Revision: 1.22 $
* $Date: 2000/01/07 10:29:59 $ * $Date: 2000/01/07 15:31:12 $
* ------------------------------------------------------------------------*/ * ------------------------------------------------------------------------*/
#include "prelude.h" #include "prelude.h"
...@@ -1066,7 +1066,7 @@ Void finishGHCModule ( Cell root ) ...@@ -1066,7 +1066,7 @@ Void finishGHCModule ( Cell root )
c = findQualTyconWithoutConsultingExportList ( q ); c = findQualTyconWithoutConsultingExportList ( q );
if (isNull(c)) goto notfound; if (isNull(c)) goto notfound;
fprintf(stderr, " type %s\n", textToStr(textOf(ex)) ); 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); addTycon(c);
break; break;
...@@ -1087,7 +1087,7 @@ Void finishGHCModule ( Cell root ) ...@@ -1087,7 +1087,7 @@ Void finishGHCModule ( Cell root )
original (defining) module. original (defining) module.
*/ */
if (abstract) { if (abstract) {
module(mod).exports = cons(c, module(mod).exports); module(mod).exports = cons(pair(c,NIL), module(mod).exports);
addTycon(c); addTycon(c);
fprintf ( stderr, "(abstract) "); fprintf ( stderr, "(abstract) ");
} else { } else {
...@@ -1101,7 +1101,7 @@ Void finishGHCModule ( Cell root ) ...@@ -1101,7 +1101,7 @@ Void finishGHCModule ( Cell root )
c = findQualNameWithoutConsultingExportList ( q ); c = findQualNameWithoutConsultingExportList ( q );
fprintf(stderr, "%s ", textToStr(name(c).text)); fprintf(stderr, "%s ", textToStr(name(c).text));
assert(nonNull(c)); assert(nonNull(c));
module(mod).exports = cons(c, module(mod).exports); /* module(mod).exports = cons(c, module(mod).exports); */
addName(c); addName(c);
} }
} }
...@@ -1120,7 +1120,7 @@ Void finishGHCModule ( Cell root ) ...@@ -1120,7 +1120,7 @@ Void finishGHCModule ( Cell root )
c = findQualNameWithoutConsultingExportList ( q ); c = findQualNameWithoutConsultingExportList ( q );
fprintf(stderr, "%s ", textToStr(name(c).text)); fprintf(stderr, "%s ", textToStr(name(c).text));
if (isNull(c)) goto notfound; if (isNull(c)) goto notfound;
module(mod).exports = cons(c, module(mod).exports); /* module(mod).exports = cons(c, module(mod).exports); */
addName(c); addName(c);
} }
fprintf(stderr, "}\n" ); fprintf(stderr, "}\n" );
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
* included in the distribution. * included in the distribution.
* *
* $RCSfile: static.c,v $ * $RCSfile: static.c,v $
* $Revision: 1.20 $ * $Revision: 1.21 $
* $Date: 1999/12/10 15:59:50 $ * $Date: 2000/01/07 15:31:12 $
* ------------------------------------------------------------------------*/ * ------------------------------------------------------------------------*/
#include "prelude.h" #include "prelude.h"
...@@ -469,6 +469,7 @@ Pair importSpec; { ...@@ -469,6 +469,7 @@ Pair importSpec; {
} else { } else {
imports = resolveImportList(m, impList); imports = resolveImportList(m, impList);
} }
for(; nonNull(imports); imports=tl(imports)) { for(; nonNull(imports); imports=tl(imports)) {
Cell e = hd(imports); Cell e = hd(imports);
if (!cellIsMember(e,hidden)) if (!cellIsMember(e,hidden))
...@@ -485,6 +486,7 @@ Cell e; { ...@@ -485,6 +486,7 @@ Cell e; {
switch (whatIs(e)) { switch (whatIs(e)) {
case NAME : importName(source,e); case NAME : importName(source,e);
break; break;
case TUPLE:
case TYCON : importTycon(source,e); case TYCON : importTycon(source,e);
break; break;
case CLASS : importClass(source,e); case CLASS : importClass(source,e);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment