ValuePrinter option
Shell.Options.ValuePrinter
val maximumRefDepth: int option
The maximumRefDepth option is an integer determining the maximum number of self-references a function makes to print. The value printer could be sent into an infinite loop trying to print all the self-references without this upper limit. The default value is 3. The maximumDepth will override maximumRefDepth if it is set to a smaller value.
The value of this option appears, and can be set, in the Maximum ref depth text box in a GUI listener, compilation manager, or inspector tool's View > Value Printer dialog.
The following example illustrates the effect of maximumRefDepth:
MLWorks> ref(ref(ref 3)); val it : int ref ref ref = ref(ref(ref(3))) MLWorks> set (maximumrefDepth, 1); val it : unit = () MLWorks> ref(ref(ref 3)); val it : int ref ref ref = ref(_) MLWorks>