tweak lambda evaluator
authorJim Pryor <profjim@jimpryor.net>
Thu, 23 Sep 2010 07:30:20 +0000 (03:30 -0400)
committerJim Pryor <profjim@jimpryor.net>
Thu, 23 Sep 2010 07:30:20 +0000 (03:30 -0400)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
lambda_evaluator.mdwn

index 8de938d..5b49732 100644 (file)
@@ -83,7 +83,7 @@ Object.prototype.error = function (message, t) {
             tree = parse(source);
  //           string = JSON.stringify(tree, ['key', 'name', 'message', 'value', 'arity', 'first', 'second', 'third', 'fourth'], 4);
  //           string = JSON.stringify(tree.handler(), ['key', 'name', 'message', 'value', 'arity', 'first', 'second', 'tag', 'variable', 'left', 'right', 'bound', 'body' ], 4);
             tree = parse(source);
  //           string = JSON.stringify(tree, ['key', 'name', 'message', 'value', 'arity', 'first', 'second', 'third', 'fourth'], 4);
  //           string = JSON.stringify(tree.handler(), ['key', 'name', 'message', 'value', 'arity', 'first', 'second', 'tag', 'variable', 'left', 'right', 'bound', 'body' ], 4);
-                       string = tree.handler().to_string();
+                       string = reduce(tree.handler(), false, false).to_string();
         } catch (e) {
             string = JSON.stringify(e, ['name', 'message', 'from', 'to', 'key',
                     'value', 'arity', 'first', 'second', 'third', 'fourth'], 4);
         } catch (e) {
             string = JSON.stringify(e, ['name', 'message', 'from', 'to', 'key',
                     'value', 'arity', 'first', 'second', 'third', 'fourth'], 4);