If we take the following example atd file:
type new_pull = {
title: string;
?body: string option;
base: string;
head: string;
} <ocaml field_prefix="new_pull_">
and want to get the "constructor" (create_new_pull function) using atdgen -v, we will get the following function:
val create_new_pull :
new_pull_title: string ->
?new_pull_body: string ->
new_pull_base: string ->
new_pull_head: string ->
unit -> new_pull
(** Create a record of type {!type:new_pull}. *)
Instead i would've expected the following more concise version:
val create_new_pull :
title: string ->
?body: string ->
base: string ->
head: string ->
unit -> new_pull
(** Create a record of type {!type:new_pull}. *)
I'm fairly new to atdgen so maybe i'm missing some known option or attribute to be able to get the right version that i wasn't able to find in the documentation.
Atdgen version: 2.16.0