module Ast_io: Migrate_parsetree_ast_io
type
ast =
| |
Impl : |
| |
Intf : |
typefilename =
string
type
read_error =
| |
Not_a_binary_ast of |
(* |
The input doesn't contain a binary AST. The argument corresponds
to the bytes from the input that were consumed.
| *) |
| |
Unknown_version of |
(* |
The input contains a binary AST for an unknown version of OCaml.
The argument is the unknown magic number.
| *) |
val from_channel : Pervasives.in_channel ->
(filename * ast,
read_error)
Pervasives.result
Any exception raised during unmarshalling (see Marshal
) can escape.
val from_bytes : bytes ->
int ->
(filename * ast,
read_error)
Pervasives.result
See from_channel
description for exception that can be raised.
val to_channel : Pervasives.out_channel ->
filename -> ast -> unit
val to_bytes : filename -> ast -> bytes