diff options
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 62bfd145c0a9..b5e8bb289b0e 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -17,6 +17,11 @@ macro_rules! builtin { pub fn global_builtins() -> HashMap<&'static str, Value> { let mut globals = HashMap::new(); + builtin!(globals, "isNull", 1, |args| Ok(Value::Bool(matches!( + args[0], + Value::Null + )))); + builtin!(globals, "toString", 1, |args| { // TODO: toString is actually not the same as Display Ok(Value::String(format!("{}", args[0]).into())) |