OCaml compiler library : Misc.Magic_number

`sig
type native_obj_config = { flambda : bool; }
val native_obj_config : Misc.Magic_number.native_obj_config
type version = int
type kind =
Exec
| Cmi
| Cmo
| Cma
| Cmx of Misc.Magic_number.native_obj_config
| Cmxa of Misc.Magic_number.native_obj_config
| Cmxs
| Cmt
| Ast_impl
| Ast_intf
type info = {
kind : Misc.Magic_number.kind;
version : Misc.Magic_number.version;
}
type raw = string
type parse_error = Truncated of string | Not_a_magic_number of string
val explain_parse_error :
Misc.Magic_number.kind option -> Misc.Magic_number.parse_error -> string
val parse :
Misc.Magic_number.raw ->
(Misc.Magic_number.info, Misc.Magic_number.parse_error) Stdlib.result
val read_info :
Stdlib.in_channel ->
(Misc.Magic_number.info, Misc.Magic_number.parse_error) Stdlib.result
val magic_length : int
type 'a unexpected = { expected : 'a; actual : 'a; }
type unexpected_error =
Kind of Misc.Magic_number.kind Misc.Magic_number.unexpected
| Version of Misc.Magic_number.kind *
Misc.Magic_number.version Misc.Magic_number.unexpected
val check_current :
Misc.Magic_number.kind ->
Misc.Magic_number.info ->
(unit, Misc.Magic_number.unexpected_error) Stdlib.result
val explain_unexpected_error : Misc.Magic_number.unexpected_error -> string
type error =
Parse_error of Misc.Magic_number.parse_error
| Unexpected_error of Misc.Magic_number.unexpected_error
val read_current_info :
expected_kind:Misc.Magic_number.kind option ->
Stdlib.in_channel ->
(Misc.Magic_number.info, Misc.Magic_number.error) Stdlib.result
val string_of_kind : Misc.Magic_number.kind -> string
val human_name_of_kind : Misc.Magic_number.kind -> string
val current_raw : Misc.Magic_number.kind -> Misc.Magic_number.raw
val current_version : Misc.Magic_number.kind -> Misc.Magic_number.version
type raw_kind = string
val parse_kind :
Misc.Magic_number.raw_kind -> Misc.Magic_number.kind option
val raw_kind : Misc.Magic_number.kind -> Misc.Magic_number.raw_kind
val raw : Misc.Magic_number.info -> Misc.Magic_number.raw
val all_kinds : Misc.Magic_number.kind list
end`