We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm running into an issue where my atd definition will succeed in generating an ml file of types (atdgen -t), but the file won't compile.
I managed to reduce it to the following. If I remove any of the definitions, then compiling the generated test_t.ml file succeeds.
type sku = { product: product; } type product = { sku: sku; } type plan = { product: product; } type customer = { plan: plan; customer: customer; } type charge = { order: order; } type order = { charge: charge; sku: sku; }
The generated file (atdgen -t test.atd):
atdgen -t test.atd
(* Auto-generated from "test.atd" *) type plan = { product: product } type customer = { plan: plan; customer: customer } type product = { sku: sku } and sku = { product: product } type charge = { order: order } and order = { charge: charge; sku: sku }
$ ocamlc src/test_t.ml File "src/test_t.ml", line 4, characters 23-30: Error: Unbound type constructor product
The text was updated successfully, but these errors were encountered:
Thanks for the repro case.
Sorry, something went wrong.
@dwwoelfel as a workaround, could you check if the -rec flag helps?
-rec
Thanks @rgrinberg! That solves the problem for me for now :)
No branches or pull requests
I'm running into an issue where my atd definition will succeed in generating an ml file of types (atdgen -t), but the file won't compile.
I managed to reduce it to the following. If I remove any of the definitions, then compiling the generated test_t.ml file succeeds.
The generated file (
atdgen -t test.atd
):The text was updated successfully, but these errors were encountered: