Safe Haskell | None |
---|---|
Language | Haskell2010 |
Command prefix parsing effect
Synopsis
- data ParsePrefix m a where
- ParsePrefix :: Message -> ParsePrefix m (Maybe (Text, Text))
- parsePrefix :: forall r. MemberWithError ParsePrefix r => Message -> Sem r (Maybe (Text, Text))
- useConstantPrefix :: Text -> Sem (ParsePrefix ': r) a -> Sem r a
Documentation
data ParsePrefix m a where Source #
An effect for parsing the prefix of a command.
ParsePrefix :: Message -> ParsePrefix m (Maybe (Text, Text)) |
Instances
type DefiningModule (ParsePrefix :: k -> Type -> Type) Source # | |
Defined in Calamity.Commands.ParsePrefix |
parsePrefix :: forall r. MemberWithError ParsePrefix r => Message -> Sem r (Maybe (Text, Text)) Source #
useConstantPrefix :: Text -> Sem (ParsePrefix ': r) a -> Sem r a Source #
A default interpretation for ParsePrefix
that uses a single constant prefix.