Module Melange_ppx_lib.Ast_io

module Compiler_version = Ppxlib_ast.Compiler_version
module type OCaml_version = Ppxlib_ast.OCaml_version
module Intf_or_impl : sig ... end
type input_version = (module OCaml_version)
val fall_back_input_version : (module OCaml_version)
type t = {
  1. input_name : string;
  2. input_version : input_version;
  3. ast : Intf_or_impl.t;
}
type read_error =
  1. | Not_a_binary_ast
  2. | Unknown_version of string * input_version
  3. | Source_parse_error of Ppxlib_ast.Location_error.t * input_version
  4. | System_error of Ppxlib_ast.Location_error.t * input_version
type input_source =
  1. | Stdin
  2. | File of string
type input_kind =
  1. | Possibly_source of {
    1. filename : string;
    2. parse_fun : Lexing.lexbuf -> Intf_or_impl.t;
    }
  2. | Necessarily_binary
val read : input_source -> input_kind:input_kind -> (t, read_error) result
val read_exn : input_source -> input_kind:input_kind -> t