Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file conv_intf.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252moduletypePrimitives=sigvaljsonaf_of_unit:unit->Type.tvaljsonaf_of_bool:bool->Type.tvaljsonaf_of_string:string->Type.tvaljsonaf_of_bytes:bytes->Type.tvaljsonaf_of_char:char->Type.tvaljsonaf_of_int:int->Type.tvaljsonaf_of_float:float->Type.tvaljsonaf_of_int32:int32->Type.tvaljsonaf_of_int64:int64->Type.tvaljsonaf_of_nativeint:nativeint->Type.tvaljsonaf_of_ref:('a->Type.t)->'aref->Type.tvaljsonaf_of_lazy_t:('a->Type.t)->'alazy_t->Type.tvaljsonaf_of_option:('a->Type.t)->'aoption->Type.tvaljsonaf_of_list:('a->Type.t)->'alist->Type.tvaljsonaf_of_array:('a->Type.t)->'aarray->Type.tvaljsonaf_of_hashtbl:('a->Type.t)->('b->Type.t)->('a,'b)Hashtbl.t->Type.tvalunit_of_jsonaf:Type.t->unitvalbool_of_jsonaf:Type.t->boolvalstring_of_jsonaf:Type.t->stringvalbytes_of_jsonaf:Type.t->bytesvalchar_of_jsonaf:Type.t->charvalint_of_jsonaf:Type.t->intvalfloat_of_jsonaf:Type.t->floatvalint32_of_jsonaf:Type.t->int32valint64_of_jsonaf:Type.t->int64valnativeint_of_jsonaf:Type.t->nativeintvalref_of_jsonaf:(Type.t->'a)->Type.t->'arefvallazy_t_of_jsonaf:(Type.t->'a)->Type.t->'alazy_tvaloption_of_jsonaf:(Type.t->'a)->Type.t->'aoptionvallist_of_jsonaf:(Type.t->'a)->Type.t->'alistvalarray_of_jsonaf:(Type.t->'a)->Type.t->'aarrayvalhashtbl_of_jsonaf:(Type.t->'a)->(Type.t->'b)->Type.t->('a,'b)Hashtbl.tendmoduletypeConv=sig(** Utility Module for Jsonaf_kernel Conversions *)(** Conversion of OCaml-values to Jsonaf_kernels *)(** [jsonaf_of_unit ()] converts a value of type [unit] to an Jsonaf_kernel. *)valjsonaf_of_unit:unit->Type.t(** [jsonaf_of_bool b] converts the value [b] of type [bool] to an
Jsonaf_kernel. *)valjsonaf_of_bool:bool->Type.t(** [jsonaf_of_string str] converts the value [str] of type [string] to an
Jsonaf_kernel. *)valjsonaf_of_string:string->Type.t(** [jsonaf_of_bytes str] converts the value [str] of type [bytes] to an
Jsonaf_kernel. *)valjsonaf_of_bytes:bytes->Type.t(** [jsonaf_of_char c] converts the value [c] of type [char] to an
Jsonaf_kernel. *)valjsonaf_of_char:char->Type.t(** [jsonaf_of_int n] converts the value [n] of type [int] to an
Jsonaf_kernel. *)valjsonaf_of_int:int->Type.t(** [jsonaf_of_float n] converts the value [n] of type [float] to an
Jsonaf_kernel. *)valjsonaf_of_float:float->Type.t(** [jsonaf_of_int32 n] converts the value [n] of type [int32] to an
Jsonaf_kernel. *)valjsonaf_of_int32:int32->Type.t(** [jsonaf_of_int64 n] converts the value [n] of type [int64] to an
Jsonaf_kernel. *)valjsonaf_of_int64:int64->Type.t(** [jsonaf_of_nativeint n] converts the value [n] of type [nativeint] to an
Jsonaf_kernel. *)valjsonaf_of_nativeint:nativeint->Type.t(** [jsonaf_of_ref conv r] converts the value [r] of type ['a ref] to
an Jsonaf_kernel. Uses [conv] to convert values of type ['a] to an
Jsonaf_kernel. *)valjsonaf_of_ref:('a->Type.t)->'aref->Type.t(** [jsonaf_of_lazy_t conv l] converts the value [l] of type ['a lazy_t] to
an Jsonaf_kernel. Uses [conv] to convert values of type ['a] to an
Jsonaf_kernel. *)valjsonaf_of_lazy_t:('a->Type.t)->'alazy_t->Type.t(** [jsonaf_of_option conv opt] converts the value [opt] of type ['a
option] to an Jsonaf_kernel. Uses [conv] to convert values of type
['a] to an Jsonaf_kernel. *)valjsonaf_of_option:('a->Type.t)->'aoption->Type.t(** [jsonaf_of_pair conv1 conv2 pair] converts a pair to an Jsonaf_kernel.
It uses its first argument to convert the first element of the pair,
and its second argument to convert the second element of the pair. *)valjsonaf_of_pair:('a->Type.t)->('b->Type.t)->'a*'b->Type.t(** [jsonaf_of_triple conv1 conv2 conv3 triple] converts a triple to
an Jsonaf_kernel using [conv1], [conv2], and [conv3] to convert its
elements. *)valjsonaf_of_triple:('a->Type.t)->('b->Type.t)->('c->Type.t)->'a*'b*'c->Type.t(** [jsonaf_of_list conv lst] converts the value [lst] of type ['a
list] to an Jsonaf_kernel. Uses [conv] to convert values of type
['a] to an Jsonaf_kernel. *)valjsonaf_of_list:('a->Type.t)->'alist->Type.t(** [jsonaf_of_array conv ar] converts the value [ar] of type ['a
array] to an Jsonaf_kernel. Uses [conv] to convert values of type
['a] to an Jsonaf_kernel. *)valjsonaf_of_array:('a->Type.t)->'aarray->Type.t(** [jsonaf_of_hashtbl conv_key conv_value htbl] converts the value [htbl]
of type [('a, 'b) Hashtbl.t] to an Jsonaf_kernel. Uses [conv_key]
to convert the hashtable keys of type ['a], and [conv_value] to
convert hashtable values of type ['b] to Jsonaf_kernels. *)valjsonaf_of_hashtbl:('a->Type.t)->('b->Type.t)->('a,'b)Hashtbl.t->Type.t(** [jsonaf_of_opaque x] converts the value [x] of opaque type to an
Jsonaf_kernel. This means the user need not provide converters,
but the result cannot be interpreted. *)valjsonaf_of_opaque:'a->Type.t(** [jsonaf_of_fun f] converts the value [f] of function type to a
dummy Jsonaf_kernel. Functions cannot be serialized as Jsonaf_kernels,
but at least a placeholder can be generated for pretty-printing. *)valjsonaf_of_fun:('a->'b)->Type.t(** Conversion of Jsonaf_kernels to OCaml-values *)(** [Of_jsonaf_error (exn, jsonaf)] the exception raised when an Jsonaf_kernel
could not be successfully converted to an OCaml-value. *)exceptionOf_jsonaf_errorofexn*Type.t(** [record_check_extra_fields] checks for extra (= unknown) fields
in record Jsonaf_kernels. *)valrecord_check_extra_fields:boolref(** [of_jsonaf_error reason jsonaf] @raise Of_jsonaf_error (Failure reason, jsonaf). *)valof_jsonaf_error:string->Type.t->'a(** [of_jsonaf_error_exn exc jsonaf] @raise Of_jsonaf_error (exc, jsonaf). *)valof_jsonaf_error_exn:exn->Type.t->'a(** [unit_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[unit]. *)valunit_of_jsonaf:Type.t->unit(** [bool_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[bool]. *)valbool_of_jsonaf:Type.t->bool(** [string_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[string]. *)valstring_of_jsonaf:Type.t->string(** [bytes_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[bytes]. *)valbytes_of_jsonaf:Type.t->bytes(** [char_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[char]. *)valchar_of_jsonaf:Type.t->char(** [int_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[int]. *)valint_of_jsonaf:Type.t->int(** [float_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[float]. *)valfloat_of_jsonaf:Type.t->float(** [int32_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[int32]. *)valint32_of_jsonaf:Type.t->int32(** [int64_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value of type
[int64]. *)valint64_of_jsonaf:Type.t->int64(** [nativeint_of_jsonaf jsonaf] converts Jsonaf_kernel [jsonaf] to a value
of type [nativeint]. *)valnativeint_of_jsonaf:Type.t->nativeint(** [ref_of_jsonaf conv jsonaf] converts Jsonaf_kernel [jsonaf] to a value
of type ['a ref] using conversion function [conv], which converts
an Jsonaf_kernel to a value of type ['a]. *)valref_of_jsonaf:(Type.t->'a)->Type.t->'aref(** [lazy_t_of_jsonaf conv jsonaf] converts Jsonaf_kernel [jsonaf] to a value
of type ['a lazy_t] using conversion function [conv], which converts
an Jsonaf_kernel to a value of type ['a]. *)vallazy_t_of_jsonaf:(Type.t->'a)->Type.t->'alazy_t(** [option_of_jsonaf conv jsonaf] converts Jsonaf_kernel [jsonaf] to a value
of type ['a option] using conversion function [conv], which converts
an Jsonaf_kernel to a value of type ['a]. *)valoption_of_jsonaf:(Type.t->'a)->Type.t->'aoption(** [pair_of_jsonaf conv1 conv2 jsonaf] converts Jsonaf_kernel [jsonaf] to a pair
of type ['a * 'b] using conversion functions [conv1] and [conv2],
which convert Jsonaf_kernels to values of type ['a] and ['b]
respectively. *)valpair_of_jsonaf:(Type.t->'a)->(Type.t->'b)->Type.t->'a*'b(** [triple_of_jsonaf conv1 conv2 conv3 jsonaf] converts Jsonaf_kernel [jsonaf]
to a triple of type ['a * 'b * 'c] using conversion functions [conv1],
[conv2], and [conv3], which convert Jsonaf_kernels to values of type
['a], ['b], and ['c] respectively. *)valtriple_of_jsonaf:(Type.t->'a)->(Type.t->'b)->(Type.t->'c)->Type.t->'a*'b*'c(** [list_of_jsonaf conv jsonaf] converts Jsonaf_kernel [jsonaf] to a value
of type ['a list] using conversion function [conv], which converts
an Jsonaf_kernel to a value of type ['a]. *)vallist_of_jsonaf:(Type.t->'a)->Type.t->'alist(** [array_of_jsonaf conv jsonaf] converts Jsonaf_kernel [jsonaf] to a value
of type ['a array] using conversion function [conv], which converts
an Jsonaf_kernel to a value of type ['a]. *)valarray_of_jsonaf:(Type.t->'a)->Type.t->'aarray(** [hashtbl_of_jsonaf conv_key conv_value jsonaf] converts Jsonaf_kernel
[jsonaf] to a value of type [('a, 'b) Hashtbl.t] using conversion
function [conv_key], which converts an Jsonaf_kernel to hashtable
key of type ['a], and function [conv_value], which converts an
Jsonaf_kernel to hashtable value of type ['b]. *)valhashtbl_of_jsonaf:(Type.t->'a)->(Type.t->'b)->Type.t->('a,'b)Hashtbl.t(** [opaque_of_jsonaf jsonaf] @raise Of_jsonaf_error when attempting to
convert an Jsonaf_kernel to an opaque value. *)valopaque_of_jsonaf:Type.t->'a(** [fun_of_jsonaf jsonaf] @raise Of_jsonaf_error when attempting to
convert an Jsonaf_kernel to a function. *)valfun_of_jsonaf:Type.t->'amoduletypePrimitives=PrimitivesmodulePrimitives:Primitivesend