feat(tvix/eval): add builtins.{floor,ceil}
Change-Id: I4e6c4f96f6f5097a5c637eb3dbbd7bb8b34b7d52 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7032 Autosubmit: j4m3s <james.landrein@gmail.com> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
bd0bf6ea7d
commit
8425c2016c
7 changed files with 13 additions and 0 deletions
|
|
@ -293,6 +293,7 @@ impl Value {
|
|||
|
||||
gen_cast!(as_bool, bool, "bool", Value::Bool(b), *b);
|
||||
gen_cast!(as_int, i64, "int", Value::Integer(x), *x);
|
||||
gen_cast!(as_float, f64, "float", Value::Float(x), *x);
|
||||
gen_cast!(to_str, NixString, "string", Value::String(s), s.clone());
|
||||
gen_cast!(to_attrs, Rc<NixAttrs>, "set", Value::Attrs(a), a.clone());
|
||||
gen_cast!(to_list, NixList, "list", Value::List(l), l.clone());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue