Skip to content
Playground(another site)

bynk.exports.capability_not_provided

Error An exported capability has no provider in its context.

exports capability { Clock } lets other contexts depend on Clock and have it built for them, so the exporting context must also say how: a provides Clock = … { … } declaration. Without one, a consumer would hold a capability that nothing in the project can instantiate. Add the provider. (A derived capability, capability Name = Kind, cannot be exported at all; that is bynk.exports.derived_capability.)

Example

exports capability { Clock } // ✗ nothing provides `Clock`
capability Clock {
fn now() -> Effect[Int]
}
provides Clock = Fixed { // ✓
fn now() -> Effect[Int] { … }
}

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.capability_not_provided shows the same from the installed toolchain, without a network.