Safe Haskell | None |
---|---|
Language | Haskell2010 |
Lambdabot.Plugin.Telegram.Bot.Generic
Contents
Synopsis
- class GFromCommand command where
- gGetMessage :: command proxy -> Msg
- gGetPrefix :: command proxy -> Text
- class FromCommand command where
- getMessage :: command -> Msg
- getPrefix :: command -> Text
- fromCommand :: FromCommand command => command -> Msg
- toKebabCase :: Text -> Text
- data MaybeWith (modifier :: Modifier) a = MaybeWith a
- data Modifier = AtEnd Symbol
Documentation
class GFromCommand command where Source #
Helper type class used to derive FromCommand
via DeriveGeneric extension.
Instances
GFromCommand (V1 :: Type -> Type) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic | |
FromCommand c => GFromCommand (K1 i c :: Type -> Type) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic | |
(GFromCommand f, GFromCommand g) => GFromCommand (f :+: g) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic | |
(GFromCommand f, GFromCommand g) => GFromCommand (f :*: g) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic | |
GFromCommand f => GFromCommand (M1 D t f) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic | |
(Constructor t, GFromCommand f) => GFromCommand (M1 C t f) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic | |
GFromCommand f => GFromCommand (M1 S t f) Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot.Generic |
class FromCommand command where Source #
Minimal complete definition
Nothing
Methods
getMessage :: command -> Msg Source #
default getMessage :: (Generic command, GFromCommand (Rep command)) => command -> Msg Source #
Instances
FromCommand Msg Source # | Type class to identify the essence of incoming command and transform it to |
FromCommand SourceCmd Source # | |
FromCommand HelpCmd Source # | |
FromCommand VersionCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot | |
FromCommand UnmtlCmd Source # | |
FromCommand UndoCmd Source # | |
FromCommand TypeCmd Source # | |
FromCommand SystemCmd Source # | |
FromCommand PrettyCmd Source # | |
FromCommand PointfulCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot | |
FromCommand PlCmd Source # | |
FromCommand InstancesCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot | |
FromCommand HoogleCmd Source # | |
FromCommand HaddockCmd Source # | |
Defined in Lambdabot.Plugin.Telegram.Bot | |
FromCommand FreeCmd Source # | |
FromCommand DjinnCmd Source # | |
FromCommand CheckCmd Source # | |
FromCommand EvalCmd Source # | |
(KnownSymbol postfix, FromCommand a, modifier ~ 'AtEnd postfix) => FromCommand (MaybeWith modifier a) Source # | |
fromCommand :: FromCommand command => command -> Msg Source #
Transform incoming telegram command into Msg
.
Helpers
toKebabCase :: Text -> Text Source #
Helper to transform text into kebab case.
data MaybeWith (modifier :: Modifier) a Source #
Constructors
MaybeWith a |
Instances
(KnownSymbol postfix, FromCommand a, modifier ~ 'AtEnd postfix) => FromCommand (MaybeWith modifier a) Source # | |