diff --git a/examples/err.myc b/examples/err.myc deleted file mode 100644 index 9d0e22b..0000000 --- a/examples/err.myc +++ /dev/null @@ -1,14 +0,0 @@ -;; Output: 20 -(do - (def tst - (fn [length] - (do - (def history (series :float)) - (fn [val] - (do - length - )) - ))) - - ((tst 20) 5) -) \ No newline at end of file diff --git a/examples/soa_series.myc b/examples/soa_series.myc index 8c8cb30..8f02c15 100644 --- a/examples/soa_series.myc +++ b/examples/soa_series.myc @@ -1,6 +1,6 @@ ;; Output: 26.7 -;; Benchmark: 1.0us -;; Benchmark-Repeat: 1944 +;; Benchmark: 1.4us +;; Benchmark-Repeat: 1406 (do (def my_ticks (series {:price :float :volume :int :msg :text})) diff --git a/src/ast/rtl/core.rs b/src/ast/rtl/core.rs index 8334bad..31259d1 100644 --- a/src/ast/rtl/core.rs +++ b/src/ast/rtl/core.rs @@ -498,7 +498,10 @@ fn register_io(env: &Environment) { })); env.register_native_fn("print", print_ty, Purity::Impure, |args| { for arg in args { - print!("{}", arg); + match arg { + Value::Text(t) => print!("{}", t), + _ => print!("{}", arg), + } } println!(); Value::Void diff --git a/src/utils/tester.rs b/src/utils/tester.rs index db2f430..24f2968 100644 --- a/src/utils/tester.rs +++ b/src/utils/tester.rs @@ -100,6 +100,9 @@ pub fn run_benchmarks(update: bool, filter: Option<&str>) -> Vec) -> Vec