about summary refs log tree commit diff
path: root/tvix/eval/src/value/lambda.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-23T17·37+0300
committertazjin <tazjin@tvl.su>2022-09-01T21·41+0000
commitd57366a6c2e6abec77357457b7cfb25fe3491c40 (patch)
tree03009d77a3e85e1b2c980588b9078d12719b4804 /tvix/eval/src/value/lambda.rs
parent3ed40b4eeafb6c37ab1cc0550e591c4113efd252 (diff)
feat(tvix/eval): introduce initial `Lambda` type r/4574
Change-Id: Ifa9766f5ffeff99e926936bafd697e885e733b78
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6238
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/value/lambda.rs')
-rw-r--r--tvix/eval/src/value/lambda.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tvix/eval/src/value/lambda.rs b/tvix/eval/src/value/lambda.rs
new file mode 100644
index 000000000000..2cecb4f5373b
--- /dev/null
+++ b/tvix/eval/src/value/lambda.rs
@@ -0,0 +1,12 @@
+//! This module implements the runtime representation of functions.
+use std::rc::Rc;
+
+use crate::chunk::Chunk;
+
+use super::NixString;
+
+#[derive(Clone, Debug)]
+pub struct Lambda {
+    name: Option<NixString>,
+    chunk: Rc<Chunk>,
+}