bynk.parse.exports_after_decls
Error exports appears after other declarations.
In the fragment form of a context (the header with no braces), the exports clauses come after the uses and consumes lines and before any type or fn, so what a unit offers is stated at the top. Move the exports line up. uses and consumes follow the same rule, as bynk.parse.uses_after_decls and bynk.parse.consumes_after_decls.
Example
context shop.orderstype Id = Stringexports transparent { Id } // ✗ a declaration comes first
context shop.ordersexports transparent { Id } // ✓ clauses straight after the headertype Id = StringIn the Book
See also
- The grammar rule it governs:
exports_decl. - Every code in its category, Parser, on the diagnostic index.
bynk explain bynk.parse.exports_after_declsshows the same from the installed toolchain, without a network.