summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dd4c28a)
Fixing a couple of problems with Quantified identifiers.
(1) The string building routine for Qid's was not using
the new abstraction for showing names. The old abstraction
worked most of the time in the new system, so was only
getting tickled sometimes.
(2) Fixing the local module that top level expressions
evaluate in. By importing quantified Prelude,
this allows top level expressions like Prelude.take
And a trivial Makefile change.
# --------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #
-# $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 = ..
# --------------------------------------------------------------------------- #
TOP = ..
all :: parser.c $(GHC_LIBS_NEEDED) nHandle$(DYN_EXT) hugs
### EXTREMELY hacky
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/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
$(CC) -o $@ $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) \
-lbfd -liberty $(LIB_READLINE) $(LIB_DL) \
$(LIB_GMP) -lm
* included in the distribution.
*
* $RCSfile: hugs.c,v $
* 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>
* ------------------------------------------------------------------------*/
#include <setjmp.h>
module(evalMod).names = module(currentModule).names;
module(evalMod).tycons = module(currentModule).tycons;
module(evalMod).classes = module(currentModule).classes;
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));
* included in the distribution.
*
* $RCSfile: static.c,v $
* 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"
* ------------------------------------------------------------------------*/
#include "hugsbasictypes.h"
hidden = resolveImportList(m, snd(impList),FALSE);
imports = resolveImportList(m, DOTDOT,FALSE);
} else if (isPair(impList) && STAR == fst(impList)) {
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);
}
} else {
imports = resolveImportList(m, impList,FALSE);
}
static Cell local depExpr(line,e) /* find dependents of expression */
Int line;
Cell e; {
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)) {
//printExp(stdout,e);
switch (whatIs(e)) {
* included in the distribution.
*
* $RCSfile: storage.c,v $
* 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"
* ------------------------------------------------------------------------*/
#include "hugsbasictypes.h"
case CONIDCELL :
case CONOPCELL : return text+textOf(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++] = '.';
}
}
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;
}
text[pos] = '\0';
return text+textHw;
Module m; {
Int i;
assert(isModule(m));
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)));
{List t;
for (t = module(m).names; nonNull(t); t=tl(t))
assert(isName(hd(t)));