open Spice let () = Logs.set_reporter (Logs.format_reporter ()); Logs.set_level (Some Logs.Debug); try let ast = parse "val z = 5 val output = 1 + (({ val x = 3 val y = 4 x * y }) + z)" in let prog = compile ast in let ret = run prog in Fmt.pr "{\"program\":%a,\"output\":%a}" Code.pp_program prog Value.pp ret with Error msg -> Logs.err (fun m -> m "%s" msg)