module List : sig .. end
val iter : 'a list -> f:('a -> unit) -> unit
val map : 'a list -> f:('a -> 'b) -> 'b list
include Type_with_layout
type pos = Src_pos.Relative.t = {
row : int;
col : int;
}
val sexp_of_pos : Src_pos.Relative.t -> Type.t
module Lexer : sig .. end
val main : ?buf:Buffer.t -> Lexing.lexbuf -> Parser_with_layout.token
module Parser : Parser_with_layout
module Render : sig .. end
module Rel_pos : Src_pos.Relative
module Abs_pos : Src_pos.Absolute
type last_atom = {
immed_after : Abs_pos.t;
unescaped : bool;
}
type state = {
mutable row_shift : Rel_pos.t;
mutable current : Abs_pos.t;
mutable last_atom : last_atom option;
}
type 'a t = (char -> unit) -> state -> 'a
val return : 'a -> 'b -> 'c -> 'a
val bind : ('a -> 'b -> 'c) -> ('c -> 'a -> 'b -> 'd) -> 'a -> 'b -> 'd
val run : 'a -> ('a -> state -> 'b) -> 'b
val emit_char : (char -> 'a) -> state -> char -> unit
val emit_string : (char -> 'a) -> state -> string -> unit
val emit_chars : (char -> 'a) -> state -> char -> n:int -> unit
val advance : (char -> 'a) ->
anchor:Abs_pos.t ->
state -> by:Src_pos.Relative.t -> unescaped_atom:bool -> unit
val render_t : (char -> 'a) -> anchor:Abs_pos.t -> state -> t -> unit
val render_toc : (char -> 'a) -> anchor:Abs_pos.t -> state -> t_or_comment -> unit
val render_c : (char -> 'a) -> anchor:Abs_pos.t -> state -> comment -> unit
val render : t_or_comment -> (char -> 'a) -> state -> unit
val sexp : t_or_comment -> (char -> 'a) -> state -> unit
module Forget : sig .. end
module Cps : sig .. end
val forget_t : t -> (Type.t -> 'r) -> 'r
val forget_toc : t_or_comment -> (Type.t option -> 'r) -> 'r
val forget_tocs : t_or_comment list -> (Type.t list -> 'r) -> 'r
val t : t -> Type.t
val t_or_comment : t_or_comment -> Type.t option
val t_or_comments : t_or_comment list -> Type.t list