Skip to content
Playground(another site)

bynk.exports.undeclared_capability

Error exports capability names a capability that is not declared.

exports capability { Clock } offers a capability of this context to the contexts that consume it, so the capability has to be declared in this context, and provided there too (bynk.exports.capability_not_provided). A name that is not declared is usually a misspelling. Correct it, or declare the capability here. A name in a type exports clause is bynk.exports.undeclared_type.

Example

exports capability { Cloc } // ✗ no capability `Cloc` in this context
capability Clock {
fn now() -> Effect[Int]
}
exports capability { Clock } // ✓ the declared name
provides Clock = Fixed {
fn now() -> Effect[Int] { Effect.pure(0) }
}

In the Book

See also

  • The grammar rule it governs: exports_decl.
  • Every code in its category, Exports, on the diagnostic index.
  • bynk explain bynk.exports.undeclared_capability shows the same from the installed toolchain, without a network.