Using the following test.atd file:
type t <ocaml module="Yojson.Safe"> = abstract
type hook_config = [
| A of t nullable
]
leads to the following failure when compiling the generated module:
atdgen -t test.atd
atdgen -v test.atd
ocamlfind ocamlopt -package atdgen-runtime,yojson test_t.mli
ocamlfind ocamlopt -package atdgen-runtime,yojson test_v.mli
ocamlfind ocamlopt -package atdgen-runtime,yojson test_v.ml
File "test_v.ml", line 9, characters 2-24:
9 | Yojson.Safe.validate_t
^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value Yojson.Safe.validate_t
Using the following
test.atdfile:leads to the following failure when compiling the generated module: