diff options
-rw-r--r-- | tvix/eval/src/value/thunk.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tvix/eval/src/value/thunk.rs b/tvix/eval/src/value/thunk.rs index 345903237b76..cafa8275dec6 100644 --- a/tvix/eval/src/value/thunk.rs +++ b/tvix/eval/src/value/thunk.rs @@ -413,8 +413,11 @@ impl TotalDisplay for Thunk { } } -/// A wrapper type for tracking which thunks have already been seen in a -/// context. This is necessary for cycle detection. +/// A wrapper type for tracking which thunks have already been seen +/// in a context. This is necessary for printing and deeply forcing +/// cyclic non-diverging data structures like `rec { f = [ f ]; }`. +/// This is separate from the ThunkRepr::Blackhole mechanism, which +/// detects diverging data structures like `(rec { f = f; }).f`. /// /// The inner `HashSet` is not available on the outside, as it would be /// potentially unsafe to interact with the pointers in the set. |