| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Configuration.Data.CommandLogging
Synopsis
- newtype BufferLength = MkBufferLength Int
- parseBufferLength :: MonadFail m => m Natural -> m BufferLength
- newtype BufferTimeout = MkBufferTimeout Timeout
- parseBufferTimeout :: (Alternative f, MonadFail f) => f Natural -> f Text -> f BufferTimeout
- newtype ReportReadErrorsSwitch = MkReportReadErrorsSwitch Bool
- data CommandLoggingP (p :: ConfigPhase) = MkCommandLoggingP {}
- type CommandLoggingArgs = CommandLoggingP 'ConfigPhaseArgs
- type CommandLoggingToml = CommandLoggingP 'ConfigPhaseToml
- type CommandLoggingMerged = CommandLoggingP 'ConfigPhaseMerged
- type CommandLoggingEnv = CommandLoggingP 'ConfigPhaseEnv
- mergeCommandLogging :: (HasCallStack, MonadThrow m) => Bool -> Bool -> NESeq CommandP1 -> CommandLoggingArgs -> Maybe CommandLoggingToml -> m CommandLoggingMerged
- toEnv :: CommandLoggingMerged -> CommandLoggingEnv
- defaultCommandLoggingMerged :: Bool -> Bool -> NESeq CommandP1 -> CommandLoggingP 'ConfigPhaseMerged
- data ReadStrategyException = MkReadStrategyException
Types
Buffer length
newtype BufferLength Source #
Constructors
| MkBufferLength Int |
Instances
parseBufferLength :: MonadFail m => m Natural -> m BufferLength Source #
Buffer timeout
newtype BufferTimeout Source #
Constructors
| MkBufferTimeout Timeout |
Instances
parseBufferTimeout :: (Alternative f, MonadFail f) => f Natural -> f Text -> f BufferTimeout Source #
Report read errors
newtype ReportReadErrorsSwitch Source #
Switch for logging read errors
Constructors
| MkReportReadErrorsSwitch Bool |
Instances
Main
data CommandLoggingP (p :: ConfigPhase) Source #
Holds config related to (console and file) command logging.
Constructors
| MkCommandLoggingP | |
Fields
| |
Instances
Functions
mergeCommandLogging :: (HasCallStack, MonadThrow m) => Bool -> Bool -> NESeq CommandP1 -> CommandLoggingArgs -> Maybe CommandLoggingToml -> m CommandLoggingMerged Source #
Merges args and toml configs.
toEnv :: CommandLoggingMerged -> CommandLoggingEnv Source #
Creates env version from merged. Requires commands because we pick the read strategy based on the number of commands.
defaultCommandLoggingMerged :: Bool -> Bool -> NESeq CommandP1 -> CommandLoggingP 'ConfigPhaseMerged Source #
Exceptions
data ReadStrategyException Source #
Constructors
| MkReadStrategyException |
Instances
| Exception ReadStrategyException Source # | |
Defined in Shrun.Configuration.Data.CommandLogging | |
| Show ReadStrategyException Source # | |
Defined in Shrun.Configuration.Data.CommandLogging Methods showsPrec :: Int -> ReadStrategyException -> ShowS # show :: ReadStrategyException -> String # showList :: [ReadStrategyException] -> ShowS # | |
| Eq ReadStrategyException Source # | |
Defined in Shrun.Configuration.Data.CommandLogging Methods (==) :: ReadStrategyException -> ReadStrategyException -> Bool # (/=) :: ReadStrategyException -> ReadStrategyException -> Bool # | |