Skip to content
Playground(another site)

bynk.context.external_provider

Error A bodiless (external) provider was declared outside an adapter.

A provider with no body (provides Clock = SystemClock) says its implementation comes from elsewhere, and only an adapter has a binding to supply it. In a context every provider is written in Bynk, so it needs a body implementing the capability's operations. Add one, or move the capability into an adapter if the code is TypeScript. The reverse mistake is bynk.adapter.provider_has_body.

Example

provides Clock = SystemClock // ✗ no body, and a context has no binding
provides Clock = SystemClock { // ✓ implemented in Bynk
fn now() -> Effect[Int] {
Effect.pure(0)
}
}

In the Book

See also

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