shrun
Safe HaskellNone
LanguageGHC2021

Shrun.Configuration.Data.Truncation

Contents

Synopsis

Documentation

data TruncRegion Source #

The different regions to apply truncation rules.

Constructors

TruncCommandName

Apply truncation rules to commands/key names.

TruncLine

Apply truncation rules to command log entire lines.

Instances

Instances details
Show TruncRegion Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Eq TruncRegion Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

newtype Truncation (a :: TruncRegion) Source #

The maximum number of command characters to display in the logs.

Constructors

MkTruncation 

Fields

Instances

Instances details
(k ~ An_Iso, a ~ Int, b ~ Int) => LabelOptic "unTruncation" k (Truncation r) (Truncation r) a b Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Num (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Show (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Eq (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Methods

(==) :: Truncation a -> Truncation a -> Bool #

(/=) :: Truncation a -> Truncation a -> Bool #

Ord (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Pretty (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Methods

pretty :: Truncation a -> Doc ann Source #

prettyList :: [Truncation a] -> Doc ann Source #

DecodeTOML (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

parseTruncation :: forall m (r :: TruncRegion). MonadFail m => m Natural -> m (Truncation r) Source #

data LineTruncation Source #

Determines command log line truncation behavior. We need a separate type from Truncation to add a third option, to detect the terminal size automatically.

Misc

data DetectResult Source #

Terminal width detect result. We save this so we only look it up at most once (i.e. both --console-log-line-trunc and --file-log-line-trunc are on).

mergeLineTrunc Source #

Arguments

:: (HasCallStack, MonadCatch m, MonadIORef m, MonadTerminal m) 
=> Bool

If true, defaults to detect.

-> IORef DetectResult

Detect result cache, so we only look it up at most once.

-> Maybe (WithDisabled LineTruncation)

Args config.

-> Maybe (WithDisabled LineTruncation)

Toml config.

-> m (Maybe (Truncation 'TruncLine)) 

Merges line truncation.