
instance Delta (Throws e) (Throws e)

throwChecked :: e -> Ef (Throws e ': ms) c a
throwChecked = Send . Throw

catchChecked :: forall ms c a e. (Monad c, Functor (Messages ms))
             => Ef (Throws e ': ms) c a -> (e -> Ef ms c a) -> Ef ms c a
catchChecked act h = handleThrows act
  where
    handleThrows :: Ef (Throws e ': ms) c a -> Ef ms c a
    handleThrows = transform id go