Skip to content
Playground(another site)

bynk.parse.unknown_effect_method

Error An unknown method on Effect.

Effect.pure(value) is the only operation spelled on Effect itself in an expression: it lifts a plain value into Effect[T]. An effect otherwise comes from calling a handler or a capability's operation. Use Effect.pure.

Example

fn lift(n: Int) -> Effect[Int] {
Effect.of(n) // ✗ the only operation is `pure`
}
fn lift(n: Int) -> Effect[Int] {
Effect.pure(n) // ✓
}

In the Book

See also

  • Every code in its category, Parser, on the diagnostic index.
  • bynk explain bynk.parse.unknown_effect_method shows the same from the installed toolchain, without a network.