module Descr:sig
..end
This module provides a safe API on top of modules Unmarshal
of
Structural_descr
, using module Type
. This module offers the same
power as Unmarshal
, but in a safe way.
type 'a
t
val t_unit : unit t
val t_int : int t
val t_string : string t
val t_float : float t
val t_bool : bool t
val t_int32 : int32 t
val t_int64 : int64 t
val t_nativeint : nativeint t
val unmarshable : 'a t
val is_unmarshable : 'a t -> bool
val is_abstract : 'a t -> bool
exception Invalid_descriptor
val t_record : Structural_descr.pack array -> 'a -> 'a t
Invalid_descriptor
if the descriptor cannot be built.val t_tuple : Structural_descr.pack array -> 'a -> 'a t
Invalid_descriptor
if the descriptor cannot be built.val t_pair : 'a t -> 'b t -> ('a * 'b) t
t_tuple
for pairs.Invalid_descriptor
if the descriptor cannot be built.val t_list : 'a t -> 'a list t
Invalid_descriptor
if the descriptor cannot be built.val t_ref : 'a t -> 'a Pervasives.ref t
Invalid_descriptor
if the descriptor cannot be built.val t_option : 'a t -> 'a option t
Invalid_descriptor
if the descriptor cannot be built.val t_queue : 'a t -> 'a Queue.t t
Invalid_descriptor
if the descriptor cannot be built.val of_type : 'a Type.t -> 'a t
val of_structural : 'a Type.t -> Structural_descr.t -> 'a t
Unmarshal
's transformersval dependent_pair : 'a t -> ('a -> 'b t) -> ('a * 'b) t
Unmarshal.Dependent_pair
, but safe.Invalid_descriptor
if the descriptor cannot be built.val transform : 'a t -> ('a -> 'a) -> 'a t
Unmarshal.Transform
, but safe.Invalid_descriptor
if the given descriptor is incorrect.val return : 'a t -> (unit -> 'a) -> 'a t
Unmarshal.Return
, but safe.Invalid_descriptor
if the descriptor cannot be built.val dynamic : (unit -> 'a t) -> 'a t
Unmarshal.Dynamic
.Invalid_descriptor
if the descriptor cannot be built.val str : 'a t -> Structural_descr.t
Invalid_descriptor
if the given descriptor is incorrect.val pack : 'a t -> Structural_descr.pack
val input_val : Pervasives.in_channel -> 'a t -> 'a