Skip to content
Playground(another site)

bynk.uses.unknown_commons

Error uses names a commons that does not exist.

uses brings a commons' types, functions and constants into scope, so it must name a commons in the project, and no unit of that name exists. Check the spelling against the commons line of the unit you mean. If the unit is a context, uses is the wrong clause: that is bynk.uses.target_is_context.

Example

money.bynk
commons money
type Amount = Int where NonNegative
// shop.bynk
context shop
uses mony // ✗ no commons `mony`
uses money // ✓ the commons' declared name

In the Book

See also

  • The grammar rule it governs: uses_decl.
  • Every code in its category, Uses, on the diagnostic index.
  • bynk explain bynk.uses.unknown_commons shows the same from the installed toolchain, without a network.