Skip to content
Playground(another site)

bynk.history.not_generable

Error A for all run: History[Agent] targets an agent with a handler parameter whose type cannot be generated (e.g. a Matches refinement), so its call-history cannot be driven (testing track slice 7, ADR 0155).

To drive an agent the runner must make an argument for every handler, drawing each from its parameter's refinement domain. One parameter with no generator, such as a Matches pattern, stops it for the whole agent, since any handler may be chosen. Give that parameter a refinement that has one, such as Length(3), or test that handler with a case and a pinned value instead. The same rule applies to a value for all, where a type that cannot be generated is bynk.val.needs_pin.

Example

demo/wallet.bynk
type Code = String where Matches("[A-Z]{3}")
// tests/t.test.bynk
for all run: History[Wallet] { … } // ✗ `setLabel` takes a `Code`, which has no generator
// demo/wallet.bynk
type Code = String where Length(3) // ✓ a refinement with a generator

In the Book

See also

  • Every code in its category, History properties, on the diagnostic index.
  • bynk explain bynk.history.not_generable shows the same from the installed toolchain, without a network.