shrun-0.9: A utility program for running shell commands concurrently.
Safe HaskellNone
LanguageGHC2021

Shrun.Configuration.Env.Types

Description

Provides types and typeclasses for our environment.

Synopsis

"HasX" style typeclasses

class HasCommands env where Source #

The commands themselves.

Instances

Instances details
HasCommands (Env r) Source # 
Instance details

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 #

Instances

Instances details
HasCommandLogging (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

class HasCommonLogging env where Source #

Instances

Instances details
HasCommonLogging (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

class HasConsoleLogging env r where Source #

Instances

Instances details
HasConsoleLogging (Env r) r Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

class HasFileLogging env where Source #

Instances

Instances details
HasFileLogging (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

class HasTimeout env where Source #

Timeout, if any.

Methods

getTimeout :: env -> Maybe Timeout Source #

Instances

Instances details
HasTimeout (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

class HasInit env where Source #

Init, if any.

Methods

getInit :: env -> Maybe Text Source #

Instances

Instances details
HasInit (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

getInit :: Env r -> Maybe Text Source #

class HasAnyError env where Source #

Methods

getAnyError :: env -> TVar Bool Source #

Retrieves the anyError flag.

Instances

Instances details
HasAnyError (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

getAnyError :: Env r -> TVar Bool Source #

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.

Methods

getNotifyConfig :: env -> Maybe NotifyEnv Source #

Retrieves the notify config.

Instances

Instances details
HasNotifyConfig (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Types

data Env r Source #

The main Env type used by Shrun.

Constructors

MkEnv 

Fields

Instances

Instances details
(k ~ A_Lens, a ~ TVar Bool, b ~ TVar Bool) => LabelOptic "anyError" k (Env r) (Env r) a b Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

labelOptic :: Optic k NoIx (Env r) (Env r) a b Source #

(k ~ A_Lens, a ~ NESeq CommandP1, b ~ NESeq CommandP1) => LabelOptic "commands" k (Env r) (Env r) a b Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

labelOptic :: Optic k NoIx (Env r) (Env r) a b Source #

(k ~ A_Lens, a ~ TVar (Seq CommandP1), b ~ TVar (Seq CommandP1)) => LabelOptic "completedCommands" k (Env r) (Env r) a b Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

labelOptic :: Optic k NoIx (Env r) (Env r) a b Source #

(k ~ A_Lens, a ~ CoreConfigP 'ConfigPhaseEnv, b ~ CoreConfigP 'ConfigPhaseEnv) => LabelOptic "config" k (Env r) (Env r) a b Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

labelOptic :: Optic k NoIx (Env r) (Env r) a b Source #

(k ~ A_Lens, a ~ TBQueue (LogRegion r), b ~ TBQueue (LogRegion r)) => LabelOptic "consoleLogQueue" k (Env r) (Env r) a b Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

labelOptic :: Optic k NoIx (Env r) (Env r) a b Source #

HasAnyError (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

getAnyError :: Env r -> TVar Bool Source #

HasCommandLogging (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

HasCommands (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

HasCommonLogging (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

HasFileLogging (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

HasInit (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

Methods

getInit :: Env r -> Maybe Text Source #

HasNotifyConfig (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

HasTimeout (Env r) Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

HasConsoleLogging (Env r) r Source # 
Instance details

Defined in Shrun.Configuration.Env.Types

MonadRegionLogger m => MonadRegionLogger (ShellT (Env r) m) Source # 
Instance details

Defined in Shrun.ShellT

Associated Types

type Region (ShellT (Env r) m) 
Instance details

Defined in Shrun.ShellT

type Region (ShellT (Env r) m) = Region (ReaderT (Env r) m)

Methods

logGlobal :: Text -> ShellT (Env r) m () Source #

logRegion :: LogMode -> Region (ShellT (Env r) m) -> Text -> ShellT (Env r) m () Source #

withRegion :: HasCallStack => RegionLayout -> (Region (ShellT (Env r) m) -> ShellT (Env r) m a) -> ShellT (Env r) m a Source #

displayRegions :: HasCallStack => ShellT (Env r) m a -> ShellT (Env r) m a Source #

(MonadAppleScript m, MonadDBus m, MonadNotifySend m) => MonadNotify (ShellT (Env r) m) Source # 
Instance details

Defined in Shrun.ShellT

type Region (ShellT (Env r) m) Source # 
Instance details

Defined in Shrun.ShellT

type Region (ShellT (Env r) m) = Region (ReaderT (Env r) m)