package atdgen

  1. Overview
  2. Docs
type atd_ocaml_sum = [
  1. | `Classic
  2. | `Poly
]
type atd_ocaml_record = [
  1. | `Record
  2. | `Object
]
type atd_ocaml_int = [
  1. | `Int
  2. | `Char
  3. | `Int32
  4. | `Int64
  5. | `Float
]
type atd_ocaml_list = [
  1. | `List
  2. | `Array
]
type target = [
  1. | `Default
  2. | `Biniou
  3. | `Json
  4. | `Validate
]
type atd_ocaml_wrap = {
  1. ocaml_wrap_t : string;
  2. ocaml_wrap : string;
  3. ocaml_unwrap : string;
}
type atd_ocaml_field = {
  1. ocaml_default : string option;
  2. ocaml_fname : string;
  3. ocaml_mutable : bool;
  4. ocaml_fdoc : Ag_doc.doc option;
}
type atd_ocaml_variant = {
  1. ocaml_cons : string;
  2. ocaml_vdoc : Ag_doc.doc option;
}
type atd_ocaml_def = {
  1. ocaml_predef : bool;
  2. ocaml_ddoc : Ag_doc.doc option;
}
type atd_ocaml_repr = [
  1. | `Unit
  2. | `Bool
  3. | `Int of atd_ocaml_int
  4. | `Float
  5. | `String
  6. | `Sum of atd_ocaml_sum
  7. | `Record of atd_ocaml_record
  8. | `Tuple
  9. | `List of atd_ocaml_list
  10. | `Option
  11. | `Nullable
  12. | `Wrap of atd_ocaml_wrap option
  13. | `Name of string
  14. | `External of string * string * string
  15. | `Cell of atd_ocaml_field
  16. | `Field of atd_ocaml_field
  17. | `Variant of atd_ocaml_variant
  18. | `Def of atd_ocaml_def
]
val get_ocaml_sum : Atd_annot.t -> atd_ocaml_sum
val get_ocaml_record : Atd_annot.t -> atd_ocaml_record
val get_ocaml_field_prefix : Atd_annot.t -> string
val get_ocaml_list : Atd_annot.t -> atd_ocaml_list
val get_ocaml_wrap : Atd_ast.loc -> Atd_annot.t -> atd_ocaml_wrap option
val get_ocaml_int : Atd_annot.t -> atd_ocaml_int
val get_ocaml_default : Atd_annot.t -> string option
val get_ocaml_cons : string -> Atd_annot.t -> string
val get_ocaml_fname : string -> Atd_annot.t -> string
val get_ocaml_mutable : Atd_annot.t -> bool
val get_ocaml_predef : target -> Atd_annot.t -> bool
val get_ocaml_module_and_t : target -> string -> Atd_annot.t -> (string * string * string) option
val get_implicit_ocaml_default : ('a -> [> `Bool of 'b * [> `Bool ] * 'c | `Float of 'd * [> `Float ] * 'e | `Int of 'f * [> `Int of [< `Char | `Float | `Int | `Int32 | `Int64 ] ] * 'g | `List of 'h * 'i * [> `List of [> `Array | `List ] ] * 'j | `Nullable of 'k * 'l * [> `Nullable ] * 'm | `Option of 'n * 'o * [> `Option ] * 'p | `String of 'q * [> `String ] * 'r | `Unit of 's * [> `Unit ] * 't ]) -> 'a -> string option
val unwrap_option : ('a -> ('b, 'c) Ag_mapping.mapping) -> 'a -> ('b, 'c) Ag_mapping.mapping
val ocaml_of_atd : ?pp_convs:[ `Camlp4 of string list | `Ppx of string list ] -> target:target -> type_aliases:string option -> ((Atd_ast.loc * Atd_ast.annot) * (bool * Atd_ast.module_body) list) -> string
val map_record_creator_field : ((atd_ocaml_repr, 'a) Ag_mapping.mapping -> (atd_ocaml_repr, 'b) Ag_mapping.mapping) -> (atd_ocaml_repr, 'a) Ag_mapping.field_mapping -> string * string * string