Fix to cyc_display

Print ellipsis with a lambda received from interpreter, as an inidication there is more that is not being displayed
This commit is contained in:
Justin Ethier 2015-03-03 13:33:39 -05:00
parent 13a0a368ad
commit 917c6c00b3

View file

@ -575,7 +575,7 @@ static object Cyc_display(x) object x;
if (equal(quote_Cyc_191procedure, car(x))) { if (equal(quote_Cyc_191procedure, car(x))) {
printf(" "); printf(" ");
Cyc_display(cadr(x)); Cyc_display(cadr(x));
printf(")"); printf(" ...)"); /* skip body and env for now */
break; break;
} }
@ -1447,9 +1447,9 @@ static void dispatch_va(int argc, function_type_va func, object clo, object cont
static object apply(object cont, object func, object args){ static object apply(object cont, object func, object args){
common_type buf; common_type buf;
printf("DEBUG apply: "); //printf("DEBUG apply: ");
Cyc_display(args); //Cyc_display(args);
printf("\n"); //printf("\n");
if (!is_object_type(func)) { if (!is_object_type(func)) {
printf("Call of non-procedure: "); printf("Call of non-procedure: ");
Cyc_display(func); Cyc_display(func);
@ -1486,11 +1486,13 @@ printf("\n");
case cons_tag: case cons_tag:
if (!nullp(func) && eq(quote_Cyc_191procedure, car(func))) { if (!nullp(func) && eq(quote_Cyc_191procedure, car(func))) {
make_cons(c, func, args); make_cons(c, func, args);
/*
printf("DEBUG apply cons: "); printf("DEBUG apply cons: ");
Cyc_display(&c); Cyc_display(&c);
printf("\n"); printf("\n");
//printf("TODO: apply compound proc\n"); //printf("TODO: apply compound proc\n");
//exit(1); //exit(1);
*/
((closure)__glo_eval)->fn(3, __glo_eval, cont, &c, nil); ((closure)__glo_eval)->fn(3, __glo_eval, cont, &c, nil);
} else { } else {
printf("Unable to evaluate list\n"); printf("Unable to evaluate list\n");