ATD 4.0.0 was released today on opam.
This release introduces atdml, an experimental replacement for atdgen.
The goal is to modernize the implementation and make it easier to extend,
while keeping compatibility with existing ATD workflows.
Here’s a sample input file example.atd:
type location = {
row: int;
column: int;
?file: string option;
}
Atdml is invoked as follows, normally by the build system:
$ atdml example.atd
It produces a pair of mli and ml files. This is example.mli:
(* Auto-generated from "example.atd" by atdml. *)
type location = {
row: int;
column: int;
file: string option;
}
val create_location : row:int -> column:int -> ?file:string -> unit -> location
val location_of_yojson : Yojson.Safe.t -> location
val yojson_of_location : location -> Yojson.Safe.t
val location_of_json : string -> location
val json_of_location : location -> string
module Location : sig
type nonrec t = location
val create : row:int -> column:int -> ?file:string -> unit -> t
val of_yojson : Yojson.Safe.t -> t
val to_yojson : t -> Yojson.Safe.t
val of_json : string -> t
val to_json : t -> string
end
Release notes:
Documentation:
Project page: