Module Pre_sexp.Annotated

include Annot
type pos = Parsexp.Positions.pos = {
line : int;
col : int;
offset : int;
}
type range = Parsexp.Positions.range = {
start_pos : pos;
end_pos : pos;
}
type t =
| Atom of range * Type.t
| List of range * t list * Type.t
type 'a conv = [
| `Result of 'a
| `Error of exn * t
]
exception Conv_exn of string * exn
type stack = {
mutable positions : pos list;
mutable stack : t list list;
}
val get_sexp : t -> Type.t
val get_range : t -> range
val sexp_of_conv : ('a -> Type.t) -> [< `Error of exn * t | `Result of 'a ] -> Type.t
exception Annot_sexp of t
val find_sexp : t -> Type.t -> t option
val parse : ?⁠parse_pos:Parse_pos.t -> ?⁠len:int -> string -> (string, Annot.t) parse_result
val parse_bigstring : ?⁠parse_pos:Parse_pos.t -> ?⁠len:int -> bigstring -> (bigstringAnnot.t) parse_result
val input_rev_sexps : ?⁠parse_pos:Parse_pos.t -> ?⁠buf:bytes -> Stdlib.in_channel -> Annot.t list
val input_sexp : ?⁠parse_pos:Parse_pos.t -> Stdlib.in_channel -> Annot.t
val input_sexps : ?⁠parse_pos:Parse_pos.t -> ?⁠buf:bytes -> Stdlib.in_channel -> Annot.t list
val of_string : string -> Annot.t
val of_bigstring : bigstring -> Annot.t
val load_rev_sexps : ?⁠buf:bytes -> string -> Annot.t list
val load_sexps : ?⁠buf:bytes -> string -> Annot.t list
val load_sexp : ?⁠strict:bool -> ?⁠buf:bytes -> string -> Annot.t
val conv : (Type.t -> 'a) -> t -> [> `Error of exn * t | `Result of 'a ]
val get_conv_exn : file:string -> exc:exn -> t -> exn