about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-07T20·40+0300
committertazjin <tazjin@tvl.su>2022-08-12T12·39+0000
commit8b7d2fd59e12da150c69cb3ee7bb26a55355e439 (patch)
tree50d787cda826cc2289327a768f455ba931c9c62d /tvix/eval
parentbef8d67b6ce36bd267807de09d77b8da9c6921ab (diff)
feat(tvix/eval): add initial value representation r/4403
Change-Id: I427a04e89994662df2750dffe21991bad48aab15
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6066
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/src/main.rs1
-rw-r--r--tvix/eval/src/value.rs10
2 files changed, 11 insertions, 0 deletions
diff --git a/tvix/eval/src/main.rs b/tvix/eval/src/main.rs
index 8192965a8b61..7cc5a380e525 100644
--- a/tvix/eval/src/main.rs
+++ b/tvix/eval/src/main.rs
@@ -6,6 +6,7 @@ use std::{
 
 mod errors;
 mod eval;
+mod value;
 
 fn main() {
     let mut args = env::args();
diff --git a/tvix/eval/src/value.rs b/tvix/eval/src/value.rs
new file mode 100644
index 000000000000..037284b144b2
--- /dev/null
+++ b/tvix/eval/src/value.rs
@@ -0,0 +1,10 @@
+//! This module implements the backing representation of runtime
+//! values in the Nix language.
+
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub enum Value {
+    Null,
+    Bool(bool),
+    Integer(i64),
+    Float(f64),
+}