{-# LANGUAGE TypeFamilies #-} module Control.Monad.Trans.Interruptible.Class where import Control.Monad.Trans.Class import Control.Monad.Trans.Either class MonadTrans m => InterruptibleMonadTrans m where type RDt m :: * -> * runT :: Monad n => RDt m a -> (a -> m n b) -> n (RDt m b) instance InterruptibleMonadTrans (EitherT e) where type RDt (EitherT e) = Either e runT st f = runEitherT (hoistEither st >>= f)