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
In some cases you might wanna allow "reader" (
read :: Cap
) to be able to kill a bus too.I'm thinking on something like:
type BusRK = BusR' (kill :: Cap)
split' ∷ ∀ a. BusRW a → Tuple (BusRK a) (BusW a)
.kill ∷ ∀ eff a r. CanKill r => Exn.Error → Bus r a → Aff (avar ∷ AVAR | eff) Unit
, thisCanKill
instance will be available forwrite :: Cap
orkill :: Cap