tvix/eval: thunk cycle detection triggers at same level

#245
Opened by tazjin at 2023-02-01T07·57+00

This is only a presentation issue, not an eval issue as such:

tvix-repl> let x = y + 2; y = 42; in [ x  x x x  ] 
=> [ 44 <CYCLE> <CYCLE> <CYCLE> ] :: list

What's going on is that TotalDisplay will find the evaluated thunk in the thunk set, and terminate the printing even though it is happening on the same level.

This is a bug. I'm not sure about the semantics yet, but we have to do something more sensible here.