Safe Haskell | None |
---|---|
Language | GHC2021 |
Provides types and typeclasses for our environment.
Synopsis
- class HasCommands env where
- getCommands :: env -> NESeq CommandP1
- getCompletedCommands :: env -> TVar (Seq CommandP1)
- prependCompletedCommand :: (HasCallStack, HasCommands env, MonadReader env m, MonadSTM m) => CommandP1 -> m ()
- class HasCommandLogging env where
- getCommandLogging :: env -> CommandLoggingEnv
- class HasCommonLogging env where
- getCommonLogging :: env -> CommonLoggingEnv
- class HasConsoleLogging env r where
- getConsoleLogging :: env -> Tuple2 ConsoleLoggingEnv (TBQueue (LogRegion r))
- class HasFileLogging env where
- getFileLogging :: env -> Maybe FileLoggingEnv
- class HasTimeout env where
- getTimeout :: env -> Maybe Timeout
- class HasInit env where
- class HasAnyError env where
- getAnyError :: env -> TVar Bool
- setAnyErrorTrue :: (HasAnyError env, HasCallStack, MonadReader env m, MonadSTM m) => m ()
- class HasNotifyConfig env where
- getNotifyConfig :: env -> Maybe NotifyEnv
- data Env r = MkEnv {
- config :: CoreConfigP 'ConfigPhaseEnv
- completedCommands :: TVar (Seq CommandP1)
- consoleLogQueue :: ~(TBQueue (LogRegion r))
- anyError :: TVar Bool
- commands :: NESeq CommandP1
"HasX" style typeclasses
class HasCommands env where Source #
The commands themselves.
getCommands :: env -> NESeq CommandP1 Source #
getCompletedCommands :: env -> TVar (Seq CommandP1) Source #
Instances
HasCommands (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types |
prependCompletedCommand :: (HasCallStack, HasCommands env, MonadReader env m, MonadSTM m) => CommandP1 -> m () Source #
Prepends a completed command.
class HasCommandLogging env where Source #
getCommandLogging :: env -> CommandLoggingEnv Source #
Instances
HasCommandLogging (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types getCommandLogging :: Env r -> CommandLoggingEnv Source # |
class HasCommonLogging env where Source #
getCommonLogging :: env -> CommonLoggingEnv Source #
Instances
HasCommonLogging (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types getCommonLogging :: Env r -> CommonLoggingEnv Source # |
class HasConsoleLogging env r where Source #
getConsoleLogging :: env -> Tuple2 ConsoleLoggingEnv (TBQueue (LogRegion r)) Source #
Instances
HasConsoleLogging (Env r) r Source # | |
Defined in Shrun.Configuration.Env.Types getConsoleLogging :: Env r -> Tuple2 ConsoleLoggingEnv (TBQueue (LogRegion r)) Source # |
class HasFileLogging env where Source #
getFileLogging :: env -> Maybe FileLoggingEnv Source #
Instances
HasFileLogging (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types getFileLogging :: Env r -> Maybe FileLoggingEnv Source # |
class HasTimeout env where Source #
Timeout, if any.
getTimeout :: env -> Maybe Timeout Source #
Instances
HasTimeout (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types |
class HasAnyError env where Source #
getAnyError :: env -> TVar Bool Source #
Retrieves the anyError flag.
Instances
HasAnyError (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types |
setAnyErrorTrue :: (HasAnyError env, HasCallStack, MonadReader env m, MonadSTM m) => m () Source #
Set anyError to True
.
class HasNotifyConfig env where Source #
Class for retrieving the notify config.
getNotifyConfig :: env -> Maybe NotifyEnv Source #
Retrieves the notify config.
Instances
HasNotifyConfig (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types |
Types
The main Env
type used by Shrun.
MkEnv | |
|