| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
GitHub.Workflow.Command.Execution
Synopsis
- class Monad m => MonadCommand m where
- executeCommand :: ToCommand a => a -> m ()
- newtype PrintCommands m a = PrintCommands (m a)
Documentation
class Monad m => MonadCommand m where Source #
Monadic context in which GitHub workflow commands may be executed
- For the most basic uses, use the
IOinstance, which prints commands tostdout. - For custom monads that support
MonadIO, you may deriveMonadCommandviaPrintCommandsto get the same behavior thatIOexhibits. - A program that wishes to accommodate running in both GitHub and non-GitHub contexts
may wish to define a more sophisicated
MonadCommandinstance that prints GitHub workflow commands only when theGITHUB_ACTIONSenvironment variable is present, and otherwise takes some other more context-appropriate action.
Methods
executeCommand :: ToCommand a => a -> m () Source #
Instances
| MonadCommand IO Source # | |
Defined in GitHub.Workflow.Command.Execution Methods executeCommand :: ToCommand a => a -> IO () Source # | |
| MonadIO m => MonadCommand (PrintCommands m) Source # | |
Defined in GitHub.Workflow.Command.Execution Methods executeCommand :: ToCommand a => a -> PrintCommands m () Source # | |
newtype PrintCommands m a Source #
Constructors
| PrintCommands (m a) |