context notifier

type Notification = {
  body: String,
}

capability Sender {
  fn send(text: String) -> Effect[()]
}

provides Sender = StubSender {
  fn send(text: String) -> Effect[()] {
    Effect.pure(())
  }
}

service notify from queue("notifications") {
  on message(message: Notification) -> Effect[QueueResult] given Sender {
    let _ <- Sender.send(message.body)
    Ack
  }
}
