package atdgen

  1. Overview
  2. Docs
type loc = Atd_ast.loc
val annot_error : Atd_ast.loc -> 'a
type loc_id = string
type ('a, 'b) mapping = [
  1. | `Unit of loc * 'a * 'b
  2. | `Bool of loc * 'a * 'b
  3. | `Int of loc * 'a * 'b
  4. | `Float of loc * 'a * 'b
  5. | `String of loc * 'a * 'b
  6. | `Sum of loc * ('a, 'b) variant_mapping array * 'a * 'b
  7. | `Record of loc * ('a, 'b) field_mapping array * 'a * 'b
  8. | `Tuple of loc * ('a, 'b) cell_mapping array * 'a * 'b
  9. | `List of loc * ('a, 'b) mapping * 'a * 'b
  10. | `Option of loc * ('a, 'b) mapping * 'a * 'b
  11. | `Nullable of loc * ('a, 'b) mapping * 'a * 'b
  12. | `Wrap of loc * ('a, 'b) mapping * 'a * 'b
  13. | `Name of loc * string * ('a, 'b) mapping list * 'a option * 'b option
  14. | `External of loc * string * ('a, 'b) mapping list * 'a * 'b
  15. | `Tvar of loc * string
]
and ('a, 'b) cell_mapping = {
  1. cel_loc : loc;
  2. cel_value : ('a, 'b) mapping;
  3. cel_arepr : 'a;
  4. cel_brepr : 'b;
}
and ('a, 'b) field_mapping = {
  1. f_loc : loc;
  2. f_name : string;
  3. f_kind : Atd_ast.field_kind;
  4. f_value : ('a, 'b) mapping;
  5. f_arepr : 'a;
  6. f_brepr : 'b;
}
and ('a, 'b) variant_mapping = {
  1. var_loc : loc;
  2. var_cons : string;
  3. var_arg : ('a, 'b) mapping option;
  4. var_arepr : 'a;
  5. var_brepr : 'b;
}
type ('a, 'b) def = {
  1. def_loc : loc;
  2. def_name : string;
  3. def_param : string list;
  4. def_value : ('a, 'b) mapping option;
  5. def_arepr : 'a;
  6. def_brepr : 'b;
}
val as_abstract : [> `Name of 'a * (Atd_ast.loc * string * 'b list) * 'c ] -> (Atd_ast.loc * 'd) option
val is_abstract : [> `Name of 'a * (Atd_ast.loc * string * 'b list) * 'c ] -> bool
val loc_of_mapping : ('a, 'b) mapping -> loc
module Env : sig ... end
val subst : ('a, 'b) mapping Env.t -> ('a, 'b) mapping -> ('a, 'b) mapping
val subst_variant : ('a, 'b) mapping Env.t -> ('c, 'd) variant_mapping -> ('c, 'd) variant_mapping
val subst_field : ('a, 'b) mapping Env.t -> ('c, 'd) field_mapping -> ('e, 'f) field_mapping
val subst_cell : ('a, 'b) mapping Env.t -> ('c, 'd) cell_mapping -> ('e, 'f) cell_mapping
val apply : Env.key list -> ('a, 'b) mapping -> ('a, 'b) mapping list -> ('a, 'b) mapping
val find_name : Atd_ast.loc -> (Env.key list * ('a, 'b) mapping) Env.t -> Env.key list -> Env.key -> Env.key list * ('a, 'b) mapping
val deref_expr : (Env.key list * ('a, 'b) mapping) Env.t -> Env.key list -> ('a, 'b) mapping -> ('a, 'b) mapping
val flatten : ('a * 'b list) list -> 'b list
val make_deref : (bool * ('a, 'b) def list) list -> ('a0, 'b0) mapping -> ('a0, 'b0) mapping
val unwrap : (('a, 'b) mapping -> ('a, 'b) mapping) -> ('a, 'b) mapping -> ('a, 'b) mapping
val constructor : ('a, 'b) mapping -> string
OCaml

Innovation. Community. Security.