about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-13T04·47-0800
committertazjin <tazjin@tvl.su>2023-12-29T21·34+0000
commit11e35a77a671b3d85ea161e1799ef3f6d98201f1 (patch)
treeeac3d46a2c164445914430f9adbaf2996fe963b7 /tvix/eval/src/compiler/mod.rs
parent0c22454bb93648155b8be4b45fb5d5c8f0389673 (diff)
refactor(tvix/eval): let OpCoerceToString select the CoercionKind r/7272
Change-Id: I92d58ef216d7e0766af70f019b3dcd445284a95d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10344
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index f54dc8ba42ae..5e0c1899c0e5 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -34,6 +34,7 @@ use crate::spans::LightSpan;
 use crate::spans::ToSpan;
 use crate::value::{Closure, Formals, Lambda, NixAttrs, Thunk, Value};
 use crate::warnings::{EvalWarning, WarningKind};
+use crate::CoercionKind;
 use crate::SourceCode;
 
 use self::scope::{LocalIdx, LocalPosition, Scope, Upvalue, UpvalueKind};
@@ -444,7 +445,13 @@ impl Compiler<'_> {
                 ast::InterpolPart::Interpolation(ipol) => {
                     self.compile(slot, ipol.expr().unwrap());
                     // implicitly forces as well
-                    self.push_op(OpCode::OpCoerceToString, ipol);
+                    self.push_op(
+                        OpCode::OpCoerceToString(CoercionKind {
+                            strong: false,
+                            import_paths: true,
+                        }),
+                        ipol,
+                    );
                 }
 
                 ast::InterpolPart::Literal(lit) => {