fixing type of list*; kanren wasn't running properly

This commit is contained in:
Danny Yoo 2012-02-20 14:00:42 -05:00
parent 656825be9e
commit b8971417b2
3 changed files with 9 additions and 15 deletions

View File

@ -631,11 +631,13 @@ var invokeMainModule = function() {
.css('whitespace', 'pre')
.appendTo(subcontextDiv);
} else if (plt.runtime.isProcedure(context[i])) {
$('<div/>').text('in ' + context[i].displayName)
.addClass('stacktrace')
.css('margin-left', '10px')
.css('whitespace', 'pre')
.appendTo(subcontextDiv);
if (context[i].displayName) {
$('<div/>').text('in ' + context[i].displayName)
.addClass('stacktrace')
.css('margin-left', '10px')
.css('whitespace', 'pre')
.appendTo(subcontextDiv);
}
}
}
}

View File

@ -81,18 +81,10 @@
var isProcedure = function (x) {
return (typeof (x) === 'function' ||
x instanceof Closure);
return (typeof (x) === 'function' || x instanceof Closure);
};
var coersePrimitiveToJavaScript = function (v, MACHINE) {
return function (succ, fail) {
try {

View File

@ -603,7 +603,7 @@
'list*',
baselib.arity.makeArityAtLeast(1),
function (M) {
var result = checkList(M, 'list*', M.a - 1), i;
var result = checkAny(M, 'list*', M.a - 1), i;
for (i = M.a - 2; i >= 0; i--) {
result = makePair(M.e[M.e.length - 1 - i],
result);