| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Calamity.Commands.Check
Description
Command invokation preconditions
Documentation
A check for a command.
Every check for a command must return Nothing for the command to be run.
Constructors
| MkCheck | |
Instances
| Generic Check Source # | |
| type Rep Check Source # | |
Defined in Calamity.Commands.Check type Rep Check = D1 ('MetaData "Check" "Calamity.Commands.Check" "calamity-0.1.26.0-8Rbyh2JfYBvC9UHgZLNZiA" 'False) (C1 ('MetaCons "MkCheck" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "callback") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Context -> IO (Maybe Text))))) | |
buildCheck :: Member (Final IO) r => Text -> (Context -> Sem r (Maybe Text)) -> Sem r Check Source #
Given the name of a check and a callback in the Sem monad, build a
check by transforming the Polysemy action into an IO action.