This commit is contained in:
trimill 2024-02-28 11:47:15 -05:00
parent 2c54025d00
commit bc3fb597d5
Signed by: trimill
GPG key ID: 4F77A16E17E10BCB
7 changed files with 72 additions and 73 deletions

View file

@ -1,4 +1,3 @@
[workspace] [workspace]
members = ["talc-lang", "talc-bin", "talc-std", "talc-macros"] members = ["talc-lang", "talc-bin", "talc-std", "talc-macros"]
resolver = "2" resolver = "2"

View file

@ -49,7 +49,7 @@ pub fn time_fn(vm: &mut Vm, args: Vec<Value>) -> Result<Value> {
vmcall!(vm; func)?; vmcall!(vm; func)?;
let tf = SystemTime::now(); let tf = SystemTime::now();
let time = tf.duration_since(t0).expect("time went backwards"); let time = tf.duration_since(t0).expect("time went backwards");
Ok((time.as_secs_f64() as i64).into()) Ok(time.as_secs_f64().into())
} }
pub fn load(vm: &mut Vm) { pub fn load(vm: &mut Vm) {

View file

@ -533,7 +533,7 @@ pub fn cartprod(_: &mut Vm, args: Vec<Value>) -> Result<Value> {
state.borrow_mut().b_idx += 1; state.borrow_mut().b_idx += 1;
Ok(Value::from(vec![a_res, b_res]).to_cell()) Ok(Value::from(vec![a_res, b_res]))
}; };
Ok(NativeFunc::new(Box::new(f), 0).into()) Ok(NativeFunc::new(Box::new(f), 0).into())