Safe Haskell | None |
---|---|
Language | Haskell2010 |
Command invokation preconditions
Documentation
A check for a command.
Every check for a command must return Nothing for the command to be run.
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.14.2-inplace" 'False) (C1 ('MetaCons "MkCheck" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "callback") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (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.