| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Command
Synopsis
- runCommands :: (HasCallStack, HasCommands env, HasLogging env m, MonadAsync m, MonadAtomic m, MonadEvaluate m, MonadMVar m, MonadReader env m, MonadRegionLogger m, MonadThrow m, MonadTime m) => (HasCallStack => CommandP1 -> m ()) -> m ()
- data PredecessorResult
Primary
Arguments
| :: (HasCallStack, HasCommands env, HasLogging env m, MonadAsync m, MonadAtomic m, MonadEvaluate m, MonadMVar m, MonadReader env m, MonadRegionLogger m, MonadThrow m, MonadTime m) | |
| => (HasCallStack => CommandP1 -> m ()) | Individual command runner. |
| -> m () |
Responsible for scheduling commands.
Misc
data PredecessorResult Source #
Given a vertex v, PredecessorResult represents the status of all of
its predecessors. Note that this refers to the status of the
'edge condition', not the predecessor command itself. For instance,
if we have 'cmd1 | cmd2' and cmd1 fails, that is considered
PredecessorSuccess.
The algebra is left-biased for identical constructors, otherwise takes the greatest in
PredecessorSuccess < PredecessorFailure < PredecessorUnfinished
We have unfinished higher than failed as we only need to consider the overall success/failed status once, when everything has finished. This also makes logging simpler, as we only print non-debug messages for failure, and having unfinished first means we do not have multiple commands all printing the same "cannot start command ... due to other failure" log.
Constructors
| PredecessorUnfinished Vertex | Some predecessor unfinished. |
| PredecessorSuccess | All predecessors finished and expectations matched. Note that this does not necessarily imply all predecessor commands finished successfully. |
| PredecessorFailure Bool Vertex | Some predecessor finished but did not match the expectation. The boolean is True iff failure was expected. |
Instances
| Monoid PredecessorResult Source # | |
Defined in Shrun.Command Methods mappend :: PredecessorResult -> PredecessorResult -> PredecessorResult # mconcat :: [PredecessorResult] -> PredecessorResult # | |
| Semigroup PredecessorResult Source # | |
Defined in Shrun.Command Methods (<>) :: PredecessorResult -> PredecessorResult -> PredecessorResult # sconcat :: NonEmpty PredecessorResult -> PredecessorResult # stimes :: Integral b => b -> PredecessorResult -> PredecessorResult # | |
| Show PredecessorResult Source # | |
Defined in Shrun.Command Methods showsPrec :: Int -> PredecessorResult -> ShowS # show :: PredecessorResult -> String # showList :: [PredecessorResult] -> ShowS # | |
| Eq PredecessorResult Source # | |
Defined in Shrun.Command Methods (==) :: PredecessorResult -> PredecessorResult -> Bool # (/=) :: PredecessorResult -> PredecessorResult -> Bool # | |