package atd

  1. Overview
  2. Docs
exception Atd_error of string
type annot = annot_section list
and annot_section = string * (loc * annot_field list)
and annot_field = string * (loc * string option)
type full_module = module_head * module_body
and module_head = loc * annot
and module_body = module_item list
and module_item = [
  1. | `Type of type_def
]
and type_def = loc * (string * type_param * annot) * type_expr
and type_param = string list
and type_expr = [
  1. | `List of loc * type_expr * annot
  2. | `Name of loc * type_inst * annot
  3. | `Nullable of loc * type_expr * annot
  4. | `Option of loc * type_expr * annot
  5. | `Record of loc * field list * annot
  6. | `Shared of loc * type_expr * annot
  7. | `Sum of loc * variant list * annot
  8. | `Tuple of loc * cell list * annot
  9. | `Tvar of loc * string
  10. | `Wrap of loc * type_expr * annot
]
and type_inst = loc * string * type_expr list
and variant = [
  1. | `Inherit of loc * type_expr
  2. | `Variant of loc * (string * annot) * type_expr option
]
and cell = loc * type_expr * annot
and field_kind = [
  1. | `Optional
  2. | `Required
  3. | `With_default
]
and field = [
  1. | `Field of loc * (string * field_kind * annot) * type_expr
  2. | `Inherit of loc * type_expr
]
val loc_of_type_expr : type_expr -> loc
val set_type_expr_loc : loc -> type_expr -> type_expr
val string_of_loc : loc -> string
val error : string -> 'a
val error_at : loc -> string -> 'a
val dummy_loc : loc
val annot_of_type_expr : type_expr -> annot
val map_annot : (annot -> annot) -> type_expr -> type_expr
val map_all_annot : (annot -> annot) -> full_module -> full_module
val fold : (type_expr -> 'a -> 'a) -> type_expr -> 'a -> 'a
val extract_type_names : ?ignorable:string list -> type_expr -> string list
val is_parametrized : type_expr -> bool
OCaml

Innovation. Community. Security.