<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Minidebug_runtime (ppx_minidebug.Minidebug_runtime)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> â€“ <a href="../index.html">ppx_minidebug</a> &#x00BB; Minidebug_runtime</nav><header class="odoc-preamble"><h1>Module <code><span>Minidebug_runtime</span></code></h1><p>The functors creating a <code>Debug_runtime</code> module that <a href="http://lukstafi.github.io/ppx_minidebug/ppx_minidebug/Minidebug_runtime/index.html"><code>ppx_minidebug</code></a> requires.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-time_tagged"><a href="#type-time_tagged" class="anchor"></a><code><span><span class="keyword">type</span> time_tagged</span><span> = </span></code><ol><li id="type-time_tagged.Not_tagged" class="def variant constructor anchored"><a href="#type-time_tagged.Not_tagged" class="anchor"></a><code><span>| </span><span><span class="constructor">Not_tagged</span></span></code></li><li id="type-time_tagged.Clock" class="def variant constructor anchored"><a href="#type-time_tagged.Clock" class="anchor"></a><code><span>| </span><span><span class="constructor">Clock</span></span></code></li><li id="type-time_tagged.Elapsed" class="def variant constructor anchored"><a href="#type-time_tagged.Elapsed" class="anchor"></a><code><span>| </span><span><span class="constructor">Elapsed</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-elapsed_times"><a href="#type-elapsed_times" class="anchor"></a><code><span><span class="keyword">type</span> elapsed_times</span><span> = </span></code><ol><li id="type-elapsed_times.Not_reported" class="def variant constructor anchored"><a href="#type-elapsed_times.Not_reported" class="anchor"></a><code><span>| </span><span><span class="constructor">Not_reported</span></span></code></li><li id="type-elapsed_times.Seconds" class="def variant constructor anchored"><a href="#type-elapsed_times.Seconds" class="anchor"></a><code><span>| </span><span><span class="constructor">Seconds</span></span></code></li><li id="type-elapsed_times.Milliseconds" class="def variant constructor anchored"><a href="#type-elapsed_times.Milliseconds" class="anchor"></a><code><span>| </span><span><span class="constructor">Milliseconds</span></span></code></li><li id="type-elapsed_times.Microseconds" class="def variant constructor anchored"><a href="#type-elapsed_times.Microseconds" class="anchor"></a><code><span>| </span><span><span class="constructor">Microseconds</span></span></code></li><li id="type-elapsed_times.Nanoseconds" class="def variant constructor anchored"><a href="#type-elapsed_times.Nanoseconds" class="anchor"></a><code><span>| </span><span><span class="constructor">Nanoseconds</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-location_format"><a href="#type-location_format" class="anchor"></a><code><span><span class="keyword">type</span> location_format</span><span> = </span></code><ol><li id="type-location_format.No_location" class="def variant constructor anchored"><a href="#type-location_format.No_location" class="anchor"></a><code><span>| </span><span><span class="constructor">No_location</span></span></code></li><li id="type-location_format.File_only" class="def variant constructor anchored"><a href="#type-location_format.File_only" class="anchor"></a><code><span>| </span><span><span class="constructor">File_only</span></span></code></li><li id="type-location_format.Beg_line" class="def variant constructor anchored"><a href="#type-location_format.Beg_line" class="anchor"></a><code><span>| </span><span><span class="constructor">Beg_line</span></span></code></li><li id="type-location_format.Beg_pos" class="def variant constructor anchored"><a href="#type-location_format.Beg_pos" class="anchor"></a><code><span>| </span><span><span class="constructor">Beg_pos</span></span></code></li><li id="type-location_format.Range_line" class="def variant constructor anchored"><a href="#type-location_format.Range_line" class="anchor"></a><code><span>| </span><span><span class="constructor">Range_line</span></span></code></li><li id="type-location_format.Range_pos" class="def variant constructor anchored"><a href="#type-location_format.Range_pos" class="anchor"></a><code><span>| </span><span><span class="constructor">Range_pos</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-toc_entry_criteria"><a href="#type-toc_entry_criteria" class="anchor"></a><code><span><span class="keyword">type</span> toc_entry_criteria</span><span> = </span></code><ol><li id="type-toc_entry_criteria.Minimal_depth" class="def variant constructor anchored"><a href="#type-toc_entry_criteria.Minimal_depth" class="anchor"></a><code><span>| </span><span><span class="constructor">Minimal_depth</span> <span class="keyword">of</span> int</span></code></li><li id="type-toc_entry_criteria.Minimal_size" class="def variant constructor anchored"><a href="#type-toc_entry_criteria.Minimal_size" class="anchor"></a><code><span>| </span><span><span class="constructor">Minimal_size</span> <span class="keyword">of</span> int</span></code></li><li id="type-toc_entry_criteria.Minimal_span" class="def variant constructor anchored"><a href="#type-toc_entry_criteria.Minimal_span" class="anchor"></a><code><span>| </span><span><span class="constructor">Minimal_span</span> <span class="keyword">of</span> <span class="xref-unresolved">Mtime</span>.span</span></code></li><li id="type-toc_entry_criteria.And" class="def variant constructor anchored"><a href="#type-toc_entry_criteria.And" class="anchor"></a><code><span>| </span><span><span class="constructor">And</span> <span class="keyword">of</span> <span><a href="#type-toc_entry_criteria">toc_entry_criteria</a> list</span></span></code></li><li id="type-toc_entry_criteria.Or" class="def variant constructor anchored"><a href="#type-toc_entry_criteria.Or" class="anchor"></a><code><span>| </span><span><span class="constructor">Or</span> <span class="keyword">of</span> <span><a href="#type-toc_entry_criteria">toc_entry_criteria</a> list</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Shared_config"><a href="#module-type-Shared_config" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Shared_config/index.html">Shared_config</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shared_config"><a href="#val-shared_config" class="anchor"></a><code><span><span class="keyword">val</span> shared_config : 
  <span><span class="optlabel">?time_tagged</span>:<a href="#type-time_tagged">time_tagged</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?elapsed_times</span>:<a href="#type-elapsed_times">elapsed_times</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?location_format</span>:<a href="#type-location_format">location_format</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?print_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?verbose_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?global_prefix</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?split_files_after</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?with_table_of_contents</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_entry</span>:<a href="#type-toc_entry_criteria">toc_entry_criteria</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?for_append</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span>string <span class="arrow">&#45;&gt;</span></span>
  <span>(<span class="keyword">module</span> <a href="module-type-Shared_config/index.html">Shared_config</a>)</span></span></code></div><div class="spec-doc"><p>Sets up a file with the given path, or if <code>split_files_after</code> is given, creates a directory to store the files. By default the logging will not be time tagged and will be appending to the file / creating more files. If <code>time_tagged</code> is <code>Clock</code>, entries will be tagged with a date and clock time; if it is <code>Elapsed</code>, they will be tagged with the time span elapsed since the start of the process (using <code>Mtime_clock.elapsed</code>). If <code>split_files_after</code> is given and <code>for_append</code> is false, clears the directory. If the opened file exceeds <code>split_files_after</code> characters, <code>Shared_config.refresh_ch ()</code> returns true; if in that case <code>Shared_config.debug_ch ()</code> is called, it will create and return a new file.</p><p>If <code>elapsed_times</code> is different from <code>Not_reported</code>, the elapsed time spans are printed for log subtrees, in the corresponding units with precision up to 1%. The times include printing out logs, therefore might not be reliable for profiling. In the runtime creation functions, <code>elapsed_times</code> defaults to <code>Not_reported</code>.</p><p>If <code>print_entry_ids</code> is true, the <code>entry_id</code> identifiers are printed on log headers with the syntax <code>{#ID}</code>; by default they are omitted. If <code>verbose_entry_ids</code> is true, the <code>entry_id</code> identifiers are also printed on logged values.</p><p>If <code>global_prefix</code> is given, the log header messages (and the log closing messages for the flushing backend) are prefixed with it.</p><p>If <code>table_of_contents_ch</code> is given or <code>with_table_of_contents=true</code>, outputs selected log headers to this channel. The provided file name is used as a prefix for links to anchors of the log headers. Note that debug runtime builders that take a channel instead of a file name, will use <code>global_prefix</code> instead for the anchor links. The setting <code>toc_entry</code> controls the selection of headers to include in a ToC (it defaults to <code>And []</code>, which means including all entries).</p><p><code>log_level</code>, by default 9, specifies <a href="module-type-Shared_config/index.html#val-init_log_level"><code>Shared_config.init_log_level</code></a>. This is the initial log level. In particular, the header &quot;BEGIN DEBUG SESSION&quot; is only printed if (initial) <code>log_level &gt; 0</code>.</p></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-Debug_runtime"><a href="#module-type-Debug_runtime" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-Debug_runtime/index.html">Debug_runtime</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>When using the <a href="http://lukstafi.github.io/ppx_minidebug/ppx_minidebug/Minidebug_runtime/index.html"><code>ppx_minidebug</code></a> syntax extension, provide a module called <code>Debug_runtime</code> with this signature in scope of the instrumented code.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Flushing"><a href="#module-Flushing" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Flushing/index.html">Flushing</a></span><span> (<a href="Flushing/argument-1-_/index.html">_</a> : <a href="module-type-Shared_config/index.html">Shared_config</a>) : <a href="module-type-Debug_runtime/index.html">Debug_runtime</a></span></code></div><div class="spec-doc"><p>The output is flushed line-at-a-time, so no output should be lost if the traced program crashes. The logged traces are still indented, but if the values to print are multi-line, their formatting might be messy. The indentation is also smaller (half of PrintBox).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-default_html_config"><a href="#val-default_html_config" class="anchor"></a><code><span><span class="keyword">val</span> default_html_config : <span class="xref-unresolved">PrintBox_html</span>.Config.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-default_md_config"><a href="#val-default_md_config" class="anchor"></a><code><span><span class="keyword">val</span> default_md_config : <span class="xref-unresolved">PrintBox_md</span>.Config.t</span></code></div></div><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-PrintBox_runtime"><a href="#module-type-PrintBox_runtime" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-PrintBox_runtime/index.html">PrintBox_runtime</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-PrintBox"><a href="#module-PrintBox" class="anchor"></a><code><span><span class="keyword">module</span> <a href="PrintBox/index.html">PrintBox</a></span><span> (<a href="PrintBox/argument-1-_/index.html">_</a> : <a href="module-type-Shared_config/index.html">Shared_config</a>) : <a href="module-type-PrintBox_runtime/index.html">PrintBox_runtime</a></span></code></div><div class="spec-doc"><p>The logged traces will be pretty-printed as trees using the `printbox` package. This logger supports conditionally disabling a particular nesting of the logs, regardless of where in the nesting level <code>no_debug_if</code> is called.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-debug_file"><a href="#val-debug_file" class="anchor"></a><code><span><span class="keyword">val</span> debug_file : 
  <span><span class="optlabel">?time_tagged</span>:<a href="#type-time_tagged">time_tagged</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?elapsed_times</span>:<a href="#type-elapsed_times">elapsed_times</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?location_format</span>:<a href="#type-location_format">location_format</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?print_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?verbose_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?global_prefix</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?split_files_after</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?with_toc_listing</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_entry</span>:<a href="#type-toc_entry_criteria">toc_entry_criteria</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_flame_graph</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?flame_graph_separation</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?highlight_terms</span>:<span class="xref-unresolved">Re</span>.t <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?exclude_on_path</span>:<span class="xref-unresolved">Re</span>.t <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?prune_upto</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?truncate_children</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?for_append</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?boxify_sexp_from_size</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?max_inline_sexp_length</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?backend</span>:
    <span>[ `Text
    <span><span>| `Html</span> of <span class="xref-unresolved">PrintBox_html</span>.Config.t</span>
    <span><span>| `Markdown</span> of <span class="xref-unresolved">PrintBox_md</span>.Config.t</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?hyperlink</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_specific_hyperlink</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?values_first_mode</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?snapshot_every_sec</span>:float <span class="arrow">&#45;&gt;</span></span>
  <span>string <span class="arrow">&#45;&gt;</span></span>
  <span>(<span class="keyword">module</span> <a href="module-type-PrintBox_runtime/index.html">PrintBox_runtime</a>)</span></span></code></div><div class="spec-doc"><p>Creates a PrintBox-based debug runtime configured to output html or markdown to a file with the given name suffixed with <code>&quot;.log&quot;</code>, <code>&quot;.html&quot;</code> or <code>&quot;.md&quot;</code> depending on the backend. By default the logging will not be time tagged and the file will be created or erased by this function. The default <code>boxify_sexp_from_size</code> value is 50.</p><p>Setting <code>~with_toc_listing:true</code> or <code>~toc_flame_graph:true</code> or both will create an additional log file, the given name suffixed with <code>&quot;-toc&quot;</code> and the corresponding file name extension. This file will collect selected entries, hyperlinking to anchors in the main logging file(s).</p><p>By default <code>backend</code> is <code>`Markdown PrintBox.default_md_config</code>. See <a href="PrintBox/index.html#type-config"><code>PrintBox.config</code></a> for details about PrintBox-specific parameters. See <a href="#val-shared_config"><code>shared_config</code></a> for the details about shared parameters.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-debug"><a href="#val-debug" class="anchor"></a><code><span><span class="keyword">val</span> debug : 
  <span><span class="optlabel">?debug_ch</span>:<span class="xref-unresolved">Stdlib</span>.out_channel <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?time_tagged</span>:<a href="#type-time_tagged">time_tagged</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?elapsed_times</span>:<a href="#type-elapsed_times">elapsed_times</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?location_format</span>:<a href="#type-location_format">location_format</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?print_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?verbose_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?description</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?global_prefix</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?table_of_contents_ch</span>:<span class="xref-unresolved">Stdlib</span>.out_channel <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_entry</span>:<a href="#type-toc_entry_criteria">toc_entry_criteria</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?highlight_terms</span>:<span class="xref-unresolved">Re</span>.t <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?exclude_on_path</span>:<span class="xref-unresolved">Re</span>.t <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?prune_upto</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?truncate_children</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_specific_hyperlink</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?values_first_mode</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?snapshot_every_sec</span>:float <span class="arrow">&#45;&gt;</span></span>
  <span>unit <span class="arrow">&#45;&gt;</span></span>
  <span>(<span class="keyword">module</span> <a href="module-type-PrintBox_runtime/index.html">PrintBox_runtime</a>)</span></span></code></div><div class="spec-doc"><p>Creates a PrintBox-based debug runtime for the <code>`Text</code> backend. By default it will log to <code>stdout</code> and will not be time tagged.</p><p>See <a href="PrintBox/index.html#type-config"><code>PrintBox.config</code></a> for details about PrintBox-specific parameters. See <a href="#val-shared_config"><code>shared_config</code></a> for the details about shared parameters.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-debug_flushing"><a href="#val-debug_flushing" class="anchor"></a><code><span><span class="keyword">val</span> debug_flushing : 
  <span><span class="optlabel">?debug_ch</span>:<span class="xref-unresolved">Stdlib</span>.out_channel <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?table_of_contents_ch</span>:<span class="xref-unresolved">Stdlib</span>.out_channel <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?filename</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?time_tagged</span>:<a href="#type-time_tagged">time_tagged</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?elapsed_times</span>:<a href="#type-elapsed_times">elapsed_times</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?location_format</span>:<a href="#type-location_format">location_format</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?print_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?verbose_entry_ids</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?description</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?global_prefix</span>:string <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?split_files_after</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?with_table_of_contents</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?toc_entry</span>:<a href="#type-toc_entry_criteria">toc_entry_criteria</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?for_append</span>:bool <span class="arrow">&#45;&gt;</span></span>
  <span><span class="optlabel">?log_level</span>:int <span class="arrow">&#45;&gt;</span></span>
  <span>unit <span class="arrow">&#45;&gt;</span></span>
  <span>(<span class="keyword">module</span> <a href="module-type-Debug_runtime/index.html">Debug_runtime</a>)</span></span></code></div><div class="spec-doc"><p>Creates a flushing-based debug runtime. By default it will log to <code>stdout</code> and will not be time tagged. At most one of <code>debug_ch</code>, <code>filename</code> can be provided. Adds the suffix <code>&quot;.log&quot;</code> to the file name if <code>filename</code> is given.</p><p>See <a href="#val-shared_config"><code>shared_config</code></a> for the details about shared parameters.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-forget_printbox"><a href="#val-forget_printbox" class="anchor"></a><code><span><span class="keyword">val</span> forget_printbox : <span><span>(<span class="keyword">module</span> <a href="module-type-PrintBox_runtime/index.html">PrintBox_runtime</a>)</span> <span class="arrow">&#45;&gt;</span></span> <span>(<span class="keyword">module</span> <a href="module-type-Debug_runtime/index.html">Debug_runtime</a>)</span></span></code></div><div class="spec-doc"><p>Upcasts the runtime.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_lazy_t"><a href="#val-sexp_of_lazy_t" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_lazy_t : <span><span>(<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Sexplib0</span>.Sexp.t)</span> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> lazy_t</span> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Sexplib0</span>.Sexp.t</span></code></div><div class="spec-doc"><p>Unlike <code>Lazy.sexp_of_t</code> available in the <code>Base</code> library, does not force the lazy value, only converts it if it's already computed and non-exception.</p></div></div></div></body></html>
