Quoting
Since [bind] essentially allows one to add arbitrary edges to the DAG, one can use it
to construct a cycle. [stabilize] will detect such cycles and raise.
Does someone have a minimal example of this ? This is not obvious to me at all. My intuition is, given OCaml’s lexical scoping rules, the obvious ways to create cycles are let rec
and ref
s. It is not obvious to me at all how one creates a cycle merely with bind
Thanks!
Clarification: I’m asking about cycle in the Incremental DAG, not OCaml heap; in particular, it may be possible for Incremental to construct a cycle in the OCaml heap without constructing a cycle in the Incremental DAG.