Home / Docs / Diagnostics

U3011: Handler missing an operation

Release v0.4.0

A handler implements every operation of its capability (spec/05 §5 rule 1): an installed handler stands for the whole capability, whatever operations a caller needs. The message lists the operations that are missing. Add an op line for each of them.

The repair at a glance

diff
  module demo

  capability Log
    op write(line: Text) -> Unit
    op flush() -> Unit

  handler silent() for Log
    op write(line) = unit
+   op flush() = unit

Failing example

una
module demo

capability Log
  op write(line: Text) -> Unit
  op flush() -> Unit

handler silent() for Log
  op write(line) = unit

Fixed example

una
module demo

capability Log
  op write(line: Text) -> Unit
  op flush() -> Unit

handler silent() for Log
  op write(line) = unit
  op flush() = unit