Migrate composer updater

This commit is contained in:
2023-10-01 17:19:06 +02:00
parent 69b24c6cfa
commit f4b7883cf2
2 changed files with 43 additions and 12 deletions

View File

@ -5,6 +5,7 @@ module SlackBuilder.Trans
import Control.Monad.Trans.Reader (ReaderT(..))
import SlackBuilder.Config
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Catch (MonadCatch(..), MonadThrow(..))
newtype SlackBuilderT a = SlackBuilderT
{ runSlackBuilderT :: ReaderT Settings IO a
@ -27,3 +28,12 @@ instance Monad SlackBuilderT
instance MonadIO SlackBuilderT
where
liftIO = SlackBuilderT . liftIO
instance MonadThrow SlackBuilderT
where
throwM = SlackBuilderT . throwM
instance MonadCatch SlackBuilderT
where
catch (SlackBuilderT action) handler =
SlackBuilderT $ catch action $ runSlackBuilderT . handler