| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Telegram.Bot.Simple.Eff
Synopsis
- newtype BotM a = BotM {- _runBotM :: ReaderT BotContext ClientM a
 
- data BotContext = BotContext {}
- liftClientM :: ClientM a -> BotM a
- runBotM :: BotContext -> BotM a -> ClientM a
- newtype Eff action model = Eff {}
- runEff :: Eff action model -> (model, [BotM action])
- eff :: BotM a -> Eff a ()
- withEffect :: BotM action -> model -> Eff action model
- (<#) :: model -> BotM action -> Eff action model
- setBotMUpdate :: Maybe Update -> BotM a -> BotM a
- setEffUpdate :: Maybe Update -> Eff action model -> Eff action model
Documentation
Bot handler context.
The context may include an Update the bot is handling at the moment.
Constructors
| BotM | |
| Fields 
 | |
Instances
| Monad BotM Source # | |
| Functor BotM Source # | |
| Applicative BotM Source # | |
| MonadIO BotM Source # | |
| Defined in Telegram.Bot.Simple.Eff | |
| MonadReader BotContext BotM Source # | |
| Defined in Telegram.Bot.Simple.Eff Methods ask :: BotM BotContext # local :: (BotContext -> BotContext) -> BotM a -> BotM a # reader :: (BotContext -> a) -> BotM a # | |
data BotContext Source #
Constructors
| BotContext | |
| Fields | |
Instances
| MonadReader BotContext BotM Source # | |
| Defined in Telegram.Bot.Simple.Eff Methods ask :: BotM BotContext # local :: (BotContext -> BotContext) -> BotM a -> BotM a # reader :: (BotContext -> a) -> BotM a # | |
liftClientM :: ClientM a -> BotM a Source #
runBotM :: BotContext -> BotM a -> ClientM a Source #
withEffect :: BotM action -> model -> Eff action model Source #