purescript-contrib/purescript-aff-bus

Add a way for Bus with no `write :: Cap` to be killed.

Opened this issue · 0 comments

In some cases you might wanna allow "reader" (read :: Cap) to be able to kill a bus too.

I'm thinking on something like:

  • add type BusRK = BusR' (kill :: Cap)
  • add split' ∷ ∀ a. BusRW a → Tuple (BusRK a) (BusW a).
  • changing kill ∷ ∀ eff a r. CanKill r => Exn.Error → Bus r a → Aff (avar ∷ AVAR | eff) Unit, this CanKill instance will be available for write :: Cap or kill :: Cap