Module Common.ReadError

type t =
| Neg_int8(*

Negative integer was positive or zero

*)
| Int_code(*

Unknown integer code while reading integer

*)
| Int_overflow(*

Overflow reading integer

*)
| Nat0_code(*

Unknown integer code while reading natural number

*)
| Nat0_overflow(*

Overflow reading natural number

*)
| Int32_code(*

Unknown integer code while reading 32bit integer

*)
| Int64_code(*

Unknown integer code while reading 64bit integer

*)
| Nativeint_code(*

Unknown integer code while reading native integer

*)
| Unit_code(*

Illegal unit value

*)
| Bool_code(*

Illegal boolean value

*)
| Option_code(*

Illegal option code

*)
| String_too_long(*

String too long

*)
| Variant_tag(*

Untagged integer encoding for variant tag

*)
| Array_too_long(*

Array too long

*)
| List_too_long of {
len : int;
max_len : int;
}
(*

List too long

*)
| Hashtbl_too_long(*

Hashtable too long

*)
| Sum_tag of string(*

Illegal sum tag for given type

*)
| Variant of string(*

Illegal variant for given type

*)
| Poly_rec_bound of string(*

Attempt to read data bound through polymorphic record fields

*)
| Variant_wrong_type of string(*

Unexpected attempt to read variant with given non-variant type

*)
| Silly_type of string(*

Silly_type type_name indicates unhandled but silly case where a type of the sort type 'a type_name = 'a is used with a polymorphic variant as type parameter and included in another polymorphic variant type.

*)
| Empty_type of string(*

Attempt to read data that corresponds to an empty type.

*)
val to_string : t -> string

to_string err

  • returns

    string representation of read error err.