package atdgen

  1. Overview
  2. Docs
type atd_ocaml_sum = [
  1. | `Classic
  2. | `Poly
]
type atd_ocaml_record = [
  1. | `Object
  2. | `Record
]
type atd_ocaml_int = [
  1. | `Char
  2. | `Float
  3. | `Int
  4. | `Int32
  5. | `Int64
]
type atd_ocaml_list = [
  1. | `Array
  2. | `List
]
type target = [
  1. | `Biniou
  2. | `Default
  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. | `Bool
  2. | `Cell of atd_ocaml_field
  3. | `Def of atd_ocaml_def
  4. | `External of string * string * string
  5. | `Field of atd_ocaml_field
  6. | `Float
  7. | `Int of atd_ocaml_int
  8. | `List of atd_ocaml_list
  9. | `Name of string
  10. | `Nullable
  11. | `Option
  12. | `Record of atd_ocaml_record
  13. | `String
  14. | `Sum of atd_ocaml_sum
  15. | `Tuple
  16. | `Unit
  17. | `Variant of atd_ocaml_variant
  18. | `Wrap of atd_ocaml_wrap option
]
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
OCaml

Innovation. Community. Security.