Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Model = TelegramState
- data Action
- data ModuleCmd
- = EvalModule EvalCmd
- | CheckModule CheckCmd
- | DjinnModule DjinnCmd
- | FreeModule FreeCmd
- | HaddockModule HaddockCmd
- | HoogleModule HoogleCmd
- | InstancesModule InstancesCmd
- | PlModule PlCmd
- | PointfulModule PointfulCmd
- | PrettyModule PrettyCmd
- | SystemModule SystemCmd
- | TypeModule TypeCmd
- | UndoModule UndoCmd
- | UnmtlModule UnmtlCmd
- | VersionModule VersionCmd
- | HelpModule HelpCmd
- | SourceModule SourceCmd
- data EvalCmd
- data CheckCmd = Check Msg
- data DjinnCmd
- data FreeCmd = Free Msg
- data HaddockCmd = Index Msg
- data HoogleCmd = Hoogle Msg
- data InstancesCmd
- data PlCmd
- data PointfulCmd
- data PrettyCmd = Pretty Msg
- data SystemCmd
- data TypeCmd
- data UndoCmd
- data UnmtlCmd = Unmtl Msg
- data VersionCmd = Tgversion Msg
- data HelpCmd = Help Msg
- data SourceCmd = Src Msg
- telegramLambdaBot :: TelegramState -> BotApp Model Action
- updateToAction :: Model -> Update -> Maybe Action
- handlePluginCommand :: FromCommand cmd => cmd -> Model -> Eff Action Model
- handleModuleAction :: ModuleCmd -> Model -> Eff Action Model
- handleAction :: Action -> Model -> Eff Action Model
- runTelegramBot :: Token -> TelegramState -> IO ()
- helpCmd :: Text
Documentation
type Model = TelegramState Source #
Telegram Model.
Supported actions: * send everything obtained from user to lambdabot ("proxy" command). * send exact module command to lambdabot. * send response back to user.
Supported modules.
Supported commands from eval
plugin.
Instances
Generic EvalCmd Source # | |
FromCommand EvalCmd Source # | |
type Rep EvalCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep EvalCmd = D1 ('MetaData "EvalCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Let" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: (C1 ('MetaCons "Undefine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "Run" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)))) |
Supported commands from check
plugin.
Supported commands from djinn
plugin.
Instances
Supported commands from free
plugin.
data HaddockCmd Source #
Supported commands from haddock
plugin.
Instances
Generic HaddockCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep HaddockCmd :: Type -> Type # from :: HaddockCmd -> Rep HaddockCmd x # to :: Rep HaddockCmd x -> HaddockCmd # | |
FromCommand HaddockCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot getMessage :: HaddockCmd -> Msg Source # getPrefix :: HaddockCmd -> Text Source # | |
type Rep HaddockCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep HaddockCmd = D1 ('MetaData "HaddockCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Index" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))) |
Supported commands from hoogle
plugin.
data InstancesCmd Source #
Supported commands from instances
plugin.
Instances
Generic InstancesCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep InstancesCmd :: Type -> Type # from :: InstancesCmd -> Rep InstancesCmd x # to :: Rep InstancesCmd x -> InstancesCmd # | |
FromCommand InstancesCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot getMessage :: InstancesCmd -> Msg Source # getPrefix :: InstancesCmd -> Text Source # | |
type Rep InstancesCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep InstancesCmd = D1 ('MetaData "InstancesCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Instances" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "InstancesImporting" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))) |
Supported commands from pl
plugin.
Instances
Generic PlCmd Source # | |
FromCommand PlCmd Source # | |
type Rep PlCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep PlCmd = D1 ('MetaData "PlCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Pl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "PlResume" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))) |
data PointfulCmd Source #
Supported commands from pointful
plugin.
Instances
Supported commands from pretty
plugin.
Supported commands from system
plugin.
Instances
Supported commands from type
plugin.
Instances
Generic TypeCmd Source # | |
FromCommand TypeCmd Source # | |
type Rep TypeCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep TypeCmd = D1 ('MetaData "TypeCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Type" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "Kind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))) |
Supported commands from undo
plugin.
Instances
Generic UndoCmd Source # | |
FromCommand UndoCmd Source # | |
type Rep UndoCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep UndoCmd = D1 ('MetaData "UndoCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Undo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg)) :+: C1 ('MetaCons "Do" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))) |
Supported commands from unmtl
plugin.
data VersionCmd Source #
Supported commands from version
plugin.
Instances
Generic VersionCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep VersionCmd :: Type -> Type # from :: VersionCmd -> Rep VersionCmd x # to :: Rep VersionCmd x -> VersionCmd # | |
FromCommand VersionCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot getMessage :: VersionCmd -> Msg Source # getPrefix :: VersionCmd -> Text Source # | |
type Rep VersionCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot type Rep VersionCmd = D1 ('MetaData "VersionCmd" "Lambdabot.Plugin.Telegram.Bot" "lambdabot-telegram-plugins-0.2.0-DOQoMdoaCwG8JUSNlA4GH8" 'False) (C1 ('MetaCons "Tgversion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Msg))) |
Supported commands from help
plugin.
Supported commands from source
plugin.
telegramLambdaBot :: TelegramState -> BotApp Model Action Source #
The bot.
handlePluginCommand :: FromCommand cmd => cmd -> Model -> Eff Action Model Source #
Extract Msg
from incoming command and send to Lambdabot.
runTelegramBot :: Token -> TelegramState -> IO () Source #
Run Telegram bot.