about summary refs log tree commit diff
path: root/tvix/eval/src/value
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/value')
-rw-r--r--tvix/eval/src/value/lambda.rs19
1 files changed, 15 insertions, 4 deletions
diff --git a/tvix/eval/src/value/lambda.rs b/tvix/eval/src/value/lambda.rs
index 2cecb4f5373b..d8609f50f367 100644
--- a/tvix/eval/src/value/lambda.rs
+++ b/tvix/eval/src/value/lambda.rs
@@ -3,10 +3,21 @@ use std::rc::Rc;
 
 use crate::chunk::Chunk;
 
-use super::NixString;
-
 #[derive(Clone, Debug)]
 pub struct Lambda {
-    name: Option<NixString>,
-    chunk: Rc<Chunk>,
+    // name: Option<NixString>,
+    pub(crate) chunk: Rc<Chunk>,
+}
+
+impl Lambda {
+    pub fn new_anonymous() -> Self {
+        Lambda {
+            // name: None,
+            chunk: Default::default(),
+        }
+    }
+
+    pub fn chunk(&mut self) -> &mut Rc<Chunk> {
+        &mut self.chunk
+    }
 }