Module OCamlR.Pretty

Provides facilities to inspect internal structure of SEXPs. Useful in the toplevel when you encounter unexpected R values.

type t =
| Recursive of t Stdlib.Lazy.t
| NULL
| SYMBOL of (string * t) option
| ARG of string
| PLACE
| LIST of pairlist
| CLOSURE of closure
| ENV of environment
| PROMISE of promise
| CALL of t * pairlist
| SPECIAL of int
| BUILTIN
| STRING of string
| STRINGS of string list
| INTS of int list
| VECSXP of t list
| BOOLS of bool list
| FLOATS of float list
| Unknown

Semantic interpretation and description of SEXPs.

and closure = {
formals : t;
body : t;
clos_env : t;
}
and environment = {
frame : t;
}
and promise = {
value : t;
expr : t;
prom_env : t;
}
and pairlist = (t * t) list
val t_of_sexp : Sexp.t -> t

Analyses recursively the structure of a given SEXP.