diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-09-22 07:33:02 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-09-22 07:33:02 +0200 |
| commit | 840290491f45157249ba97fb8f5e4cae9e04dc90 (patch) | |
| tree | 0bc54eb0aa3ec248145e725ec963c81c045f586c /app/SlackBuilder/Trans.hs | |
| parent | a7114618c1290b00745db69ef0e60b2e848a662d (diff) | |
| download | slackbuilder-840290491f45157249ba97fb8f5e4cae9e04dc90.tar.gz | |
Split the code into library and application
Diffstat (limited to 'app/SlackBuilder/Trans.hs')
| -rw-r--r-- | app/SlackBuilder/Trans.hs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/app/SlackBuilder/Trans.hs b/app/SlackBuilder/Trans.hs deleted file mode 100644 index d678a19..0000000 --- a/app/SlackBuilder/Trans.hs +++ /dev/null @@ -1,29 +0,0 @@ -module SlackBuilder.Trans - ( SlackBuilderT(..) - ) where - -import Control.Monad.Trans.Reader (ReaderT(..)) -import SlackBuilder.Config -import Control.Monad.IO.Class (MonadIO(..)) - -newtype SlackBuilderT a = SlackBuilderT - { runSlackBuilderT :: ReaderT Settings IO a - } - -instance Functor SlackBuilderT - where - fmap f (SlackBuilderT slackBuilderT) = SlackBuilderT $ f <$> slackBuilderT - -instance Applicative SlackBuilderT - where - pure = SlackBuilderT . pure - (SlackBuilderT f) <*> (SlackBuilderT x) = SlackBuilderT $ f <*> x - -instance Monad SlackBuilderT - where - return = pure - (SlackBuilderT x) >>= f = SlackBuilderT $ x >>= runSlackBuilderT . f - -instance MonadIO SlackBuilderT - where - liftIO = SlackBuilderT . liftIO |
