Skip to content
Playground(another site)

bynk.provider.unknown_capability

Error provides names a capability that does not exist.

A provides block implements a capability that the same context declares, and none of that name is declared here, so there is nothing to check the operations against. This is usually a misspelt name, or a capability that lives in another context: a provider cannot implement one from elsewhere. Declare the capability next to its provider, or correct the name.

Example

provides Clock = Fixed { // ✗ this context declares no `Clock`
fn now() -> Effect[Int] { Effect.pure(0) }
}
capability Clock { // ✓ declared alongside its provider
fn now() -> Effect[Int]
}

In the Book

See also

  • The grammar rule it governs: provider_decl.
  • Every code in its category, Providers, on the diagnostic index.
  • bynk explain bynk.provider.unknown_capability shows the same from the installed toolchain, without a network.