Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data TruncRegion
- newtype Truncation (a :: TruncRegion) = MkTruncation {}
- parseTruncation :: forall m (r :: TruncRegion). MonadFail m => m Natural -> m (Truncation r)
- data LineTruncation
- parseLineTruncation :: (Alternative m, MonadFail m) => m Natural -> m Text -> m LineTruncation
- decodeCommandNameTrunc :: Decoder (Maybe (Truncation 'TruncCommandName))
- decodeLineTrunc :: Decoder (Maybe LineTruncation)
- configToLineTrunc :: (HasCallStack, MonadTerminal m) => WithDisabled LineTruncation -> m (Maybe (Truncation 'TruncLine))
Documentation
data TruncRegion Source #
The different regions to apply truncation rules.
TruncCommandName | Apply truncation rules to commands/key names. |
TruncLine | Apply truncation rules to command log entire lines. |
Instances
Show TruncRegion Source # | |
Defined in Shrun.Configuration.Data.Truncation showsPrec :: Int -> TruncRegion -> ShowS # show :: TruncRegion -> String # showList :: [TruncRegion] -> ShowS # | |
Eq TruncRegion Source # | |
Defined in Shrun.Configuration.Data.Truncation (==) :: TruncRegion -> TruncRegion -> Bool # (/=) :: TruncRegion -> TruncRegion -> Bool # |
newtype Truncation (a :: TruncRegion) Source #
The maximum number of command characters to display in the logs.
Instances
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.
Instances
Show LineTruncation Source # | |
Defined in Shrun.Configuration.Data.Truncation showsPrec :: Int -> LineTruncation -> ShowS # show :: LineTruncation -> String # showList :: [LineTruncation] -> ShowS # | |
Eq LineTruncation Source # | |
Defined in Shrun.Configuration.Data.Truncation (==) :: LineTruncation -> LineTruncation -> Bool # (/=) :: LineTruncation -> LineTruncation -> Bool # | |
DecodeTOML LineTruncation Source # | |
Defined in Shrun.Configuration.Data.Truncation |
parseLineTruncation :: (Alternative m, MonadFail m) => m Natural -> m Text -> m LineTruncation Source #
Misc
configToLineTrunc :: (HasCallStack, MonadTerminal m) => WithDisabled LineTruncation -> m (Maybe (Truncation 'TruncLine)) Source #
Maps line trunc config to actual value.