aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alv/builtins.moon4
-rw-r--r--spec/lang/do_spec.moon2
2 files changed, 4 insertions, 2 deletions
diff --git a/alv/builtins.moon b/alv/builtins.moon
index 78cbbbf..767202b 100644
--- a/alv/builtins.moon
+++ b/alv/builtins.moon
@@ -400,12 +400,14 @@ trace = Constant.meta
prefix: Input.cold inputs[1]
value: Input.hot inputs[2]
+ @out = inputs[2].result
+
tick: =>
L\print "trace #{@inputs.prefix!}: #{@inputs.value.result}"
eval: (scope, tail) =>
L\trace "evaling #{@}"
- assert #tail == 1, "'trace!' takes exactly one parameter"
+ assert #tail == 1, "'trace' takes exactly one parameter"
tag = @tag\clone Tag.parse '-1'
inner = Cell tag, {
diff --git a/spec/lang/do_spec.moon b/spec/lang/do_spec.moon
index 67b7b33..310a75d 100644
--- a/spec/lang/do_spec.moon
+++ b/spec/lang/do_spec.moon
@@ -14,7 +14,7 @@ describe "do", ->
assert.is.true rt\is_const!
assert.is.equal (Constant.num 3), rt.result
- rt = COPILOT\eval_once '(do 1 2 (trace 3))'
+ rt = COPILOT\eval_once '(do 1 2 (def _ 3))'
assert.is.true rt\is_const!
assert.is.nil rt.result