calamity-0.1.9.0: A library for writing discord bots
Safe HaskellNone
LanguageHaskell2010

Calamity.Commands.Parser

Description

Something that can parse user input

Documentation

class Parser (a :: Type) r where Source #

Associated Types

type ParserResult a Source #

type ParserResult a = a Source #

Methods

parse :: (Context, Text) -> Sem r (Either Text (ParserResult a, Text)) Source #

Instances

Instances details
Parser Text r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Text Source #

Methods

parse :: (Context, Text) -> Sem r (Either Text (ParserResult Text, Text)) Source #

Parser Member r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult Member Source #

Member (CacheEff :: (Type -> Type) -> Type -> Type) r => Parser User r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult User Source #

Methods

parse :: (Context, Text) -> Sem r (Either Text (ParserResult User, Text)) Source #

Parser a r => Parser [a] r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult [a] Source #

Methods

parse :: (Context, Text) -> Sem r (Either Text (ParserResult [a], Text)) Source #

(Parser a r, Typeable a) => Parser (NonEmpty a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (NonEmpty a) Source #

Methods

parse :: (Context, Text) -> Sem r (Either Text (ParserResult (NonEmpty a), Text)) Source #

Parser (Snowflake Channel) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Channel) Source #

Parser (Snowflake Member) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Member) Source #

Parser (Snowflake User) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake User) Source #

Parser (Snowflake Role) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Role) Source #

Parser (Snowflake Emoji) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake Emoji) Source #

Parser (Snowflake a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (Snowflake a) Source #

Methods

parse :: (Context, Text) -> Sem r (Either Text (ParserResult (Snowflake a), Text)) Source #

(Monoid (ParserResult a), Parser a r) => Parser (KleeneConcat a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneConcat a) Source #

Parser (KleeneConcat Text) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneConcat Text) Source #

data KleeneConcat a Source #

Instances

Instances details
(Monoid (ParserResult a), Parser a r) => Parser (KleeneConcat a) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneConcat a) Source #

Parser (KleeneConcat Text) r Source # 
Instance details

Defined in Calamity.Commands.Parser

Associated Types

type ParserResult (KleeneConcat Text) Source #

type ParserResult (KleeneConcat a) Source # 
Instance details

Defined in Calamity.Commands.Parser

type ParserResult (KleeneConcat Text) Source # 
Instance details

Defined in Calamity.Commands.Parser

Orphan instances

ShowErrorComponent Text Source # 
Instance details