| Safe Haskell | None | 
|---|---|
| Language | GHC2021 | 
Shrun.Configuration.Env.Types
Contents
Description
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.
Methods
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 #
Methods
getCommandLogging :: env -> CommandLoggingEnv Source #
Instances
| HasCommandLogging (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types Methods getCommandLogging :: Env r -> CommandLoggingEnv Source #  | |
class HasCommonLogging env where Source #
Methods
getCommonLogging :: env -> CommonLoggingEnv Source #
Instances
| HasCommonLogging (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types Methods getCommonLogging :: Env r -> CommonLoggingEnv Source #  | |
class HasConsoleLogging env r where Source #
Methods
getConsoleLogging :: env -> Tuple2 ConsoleLoggingEnv (TBQueue (LogRegion r)) Source #
Instances
| HasConsoleLogging (Env r) r Source # | |
Defined in Shrun.Configuration.Env.Types Methods getConsoleLogging :: Env r -> Tuple2 ConsoleLoggingEnv (TBQueue (LogRegion r)) Source #  | |
class HasFileLogging env where Source #
Methods
getFileLogging :: env -> Maybe FileLoggingEnv Source #
Instances
| HasFileLogging (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types Methods getFileLogging :: Env r -> Maybe FileLoggingEnv Source #  | |
class HasTimeout env where Source #
Timeout, if any.
Methods
getTimeout :: env -> Maybe Timeout Source #
Instances
| HasTimeout (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types  | |
class HasAnyError env where Source #
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.
Instances
| HasNotifyConfig (Env r) Source # | |
Defined in Shrun.Configuration.Env.Types  | |
Types
The main Env type used by Shrun.
Constructors
| MkEnv | |
Fields 
  | |