diff --git a/ghc/interpreter/Makefile b/ghc/interpreter/Makefile index 84a7ea1a5626708d923e1f383137f9849a7b4c23..1881a5f42420e920eb48b081446786b373e7c5cf 100644 --- a/ghc/interpreter/Makefile +++ b/ghc/interpreter/Makefile @@ -1,6 +1,6 @@ # --------------------------------------------------------------------------- # -# $Id: Makefile,v 1.28 2000/03/22 18:14:22 sewardj Exp $ # +# $Id: Makefile,v 1.29 2000/03/31 04:13:27 andy Exp $ # # --------------------------------------------------------------------------- # TOP = .. @@ -51,9 +51,9 @@ GHC_LIBS_NEEDED = $(GHC_RUNTIME_DIR)/libHSrts.a all :: parser.c $(GHC_LIBS_NEEDED) nHandle$(DYN_EXT) hugs ### EXTREMELY hacky -hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \ +hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \ ../rts/Evaluator.o ../rts/ForeignCall.o ../rts/GC.o ../rts/Printer.o \ - ../rts/StgCRun.o ../rts/PrimOps.o + ../rts/StgCRun.o ../rts/PrimOps.o ../rts/libHSrts.a $(CC) -o $@ $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) \ -lbfd -liberty $(LIB_READLINE) $(LIB_DL) \ $(LIB_GMP) -lm diff --git a/ghc/interpreter/hugs.c b/ghc/interpreter/hugs.c index 16fabe2bd3196665f179fdc3a3ff371c2c89b370..8b5785cad314403a6b91a050ce8d7f483b0be3d7 100644 --- a/ghc/interpreter/hugs.c +++ b/ghc/interpreter/hugs.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: hugs.c,v $ - * $Revision: 1.51 $ - * $Date: 2000/03/30 12:04:13 $ + * $Revision: 1.52 $ + * $Date: 2000/03/31 04:13:27 $ * ------------------------------------------------------------------------*/ #include <setjmp.h> @@ -1682,6 +1682,8 @@ static Module allocEvalModule ( void ) module(evalMod).names = module(currentModule).names; module(evalMod).tycons = module(currentModule).tycons; module(evalMod).classes = module(currentModule).classes; + module(evalMod).qualImports + = singleton(pair(mkCon(textPrelude),modulePrelude)); return evalMod; } diff --git a/ghc/interpreter/static.c b/ghc/interpreter/static.c index e2cf438db426dc098de145311c5b7b4630aea539..8ee6aae42e345c446af75b700c729a91e4e47c49 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.32 $ - * $Date: 2000/03/23 14:54:21 $ + * $Revision: 1.33 $ + * $Date: 2000/03/31 04:13:27 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -470,10 +470,12 @@ Pair importSpec; { hidden = resolveImportList(m, snd(impList),FALSE); imports = resolveImportList(m, DOTDOT,FALSE); } else if (isPair(impList) && STAR == fst(impList)) { - List privileged; - imports = resolveImportList(m, DOTDOT, FALSE); - privileged = resolveImportList(m, snd(impList),TRUE); - imports = dupOnto(privileged,imports); + // Previously, I was forcing an import Prelude, + // but this precluded doing things like + // import Prelude hiding ( catch) + // so, for now, you need to put an explicit + // import Prelude if you use import privileged. + imports = resolveImportList(m, snd(impList),TRUE); } else { imports = resolveImportList(m, impList,FALSE); } @@ -4510,7 +4512,7 @@ Cell g; { /* expression */ static Cell local depExpr(line,e) /* find dependents of expression */ Int line; Cell e; { - // Printf( "\n\n"); print(e,100); Printf("\n"); + //Printf( "\n\n"); print(e,100); Printf("\n"); //printExp(stdout,e); switch (whatIs(e)) { diff --git a/ghc/interpreter/storage.c b/ghc/interpreter/storage.c index 01fa0146d2bd544c3a3f2e66e4b2e1ba15a1059a..ee0363bf2e8e7c74c00ec740e4b94665df1fb0ef 100644 --- a/ghc/interpreter/storage.c +++ b/ghc/interpreter/storage.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: storage.c,v $ - * $Revision: 1.56 $ - * $Date: 2000/03/30 09:02:12 $ + * $Revision: 1.57 $ + * $Date: 2000/03/31 04:13:27 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -107,17 +107,18 @@ Cell v; { case CONIDCELL : case CONOPCELL : return text+textOf(v); - case QUALIDENT : { Text pos = textHw; - Text t = qmodOf(v); - while (pos+1 < savedText && text[t]!=0) { - text[pos++] = text[t++]; + case QUALIDENT : { String qmod = textToStr(qmodOf(v)); + String qtext = textToStr(qtextOf(v)); + Text pos = textHw; + + while (pos+1 < savedText && *qmod!=0) { + text[pos++] = *qmod++; } if (pos+1 < savedText) { text[pos++] = '.'; } - t = qtextOf(v); - while (pos+1 < savedText && text[t]!=0) { - text[pos++] = text[t++]; + while (pos+1 < savedText && *qtext!=0) { + text[pos++] = *qtext++; } text[pos] = '\0'; return text+textHw; @@ -1717,7 +1718,7 @@ Void setCurrModule(m) /* set lookup tables for current module */ Module m; { Int i; assert(isModule(m)); - /* fprintf(stderr, "SET CURR MODULE %s\n", textToStr(module(m).text));*/ + /* fprintf(stderr, "SET CURR MODULE %s %d\n", textToStr(module(m).text),m);*/ {List t; for (t = module(m).names; nonNull(t); t=tl(t)) assert(isName(hd(t)));