package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Represents a 'a Value.t

type t = {
  1. node_path : Bonsai__.Node_path.t Core.Lazy.t;
  2. kind : kind;
  3. here : Core.Source_code_position.t option;
  4. id : Id.t;
}
and kind =
  1. | Constant
  2. | Exception
  3. | Incr
  4. | Named
  5. | Cutoff of {
    1. t : t;
    2. added_by_let_syntax : bool;
    }
  6. | Mapn of {
    1. inputs : t list;
    }
val sexp_of_t : t -> Sexplib0.Sexp.t
val sexp_of_kind : kind -> Sexplib0.Sexp.t
val t_of_sexp : Sexplib0.Sexp.t -> t
val kind_of_sexp : Sexplib0.Sexp.t -> kind
val of_value : 'a Value.t -> t
val minimal_sexp_of_t : t -> Core.Sexp.t

Computes a sexp that shows the structure of the value, it leaves any node_path's and positions that add an extra level of indentation making it hard to read in test output.

val inputs : t -> t list

Returns the input to the given node.

val to_string_hum : t -> string

Turns a value into a string that looks like the OCaml source code that would produce a value of the same structure as the provided value.

OCaml

Innovation. Community. Security.