package pprint
Install
Dune Dependency
Authors
Maintainers
Sources
md5=06fc2d4c448df83d4c73438b9b0c4af7
sha512=17170014d8878589956d11dfa8a8c3602266689af5b70e6c8822f5c8c3093c932ec5d82f9cac3023988bb1234f9c088e065905bb3298a698b61fcaa45d6f25ce
doc/pprint/PPrintOCaml/index.html
Module PPrintOCaml
Source
A set of functions that construct representations of OCaml values.
The string representations produced by these functions are supposed to be accepted by the OCaml parser as valid values.
The signature of this module is compatible with that expected by the camlp4
generator Camlp4RepresentationGenerator
.
These functions do not distinguish between mutable and immutable values. They do not recognize sharing, and do not incorporate a protection against cyclic values.
A representation of a value is a PPrint
document.
variant _ dc _ args
is a description of a constructed value whose data constructor is dc
and whose arguments are args
. The other two parameters are presently unused.
record _ fields
is a description of a record value whose fields are fields
. The other parameter is presently unused.
tuple args
is a description of a tuple value whose components are args
.
string s
is a representation of the string s
.
int i
is a representation of the integer i
.
int32 i
is a representation of the 32-bit integer i
.
int64 i
is a representation of the 64-bit integer i
.
nativeint i
is a representation of the native integer i
.
float f
is a representation of the floating-point number f
.
char c
is a representation of the character c
.
bool b
is a representation of the Boolenan value b
.
option f o
is a representation of the option o
, where the representation of the element, if present, is computed by the function f
.
list f xs
is a representation of the list xs
, where the representation of each element is computed by the function f
.
array f xs
is a representation of the array xs
, where the representation of each element is computed by the function f
.
ref r
is a representation of the reference r
, where the representation of the content is computed by the function f
.
unknown t _
is a representation of an unknown value of type t
.