| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Shrun.Configuration.Data.ConsoleLogging.TimerFormat
Contents
Description
Provides the TimerFormat type.
Synopsis
- data TimerFormat
- parseTimerFormat :: MonadFail m => m Text -> m TimerFormat
- timerFormatStr :: IsString a => a
- formatRelativeTime :: TimerFormat -> RelativeTime -> UnlinedText
- formatSeconds :: TimerFormat -> Natural -> UnlinedText
Type
data TimerFormat Source #
Determines how to format the timer.
Constructors
| DigitalCompact | |
| DigitalFull | |
| ProseCompact | |
| ProseFull |
Instances
| Show TimerFormat Source # | |
Defined in Shrun.Configuration.Data.ConsoleLogging.TimerFormat Methods showsPrec :: Int -> TimerFormat -> ShowS # show :: TimerFormat -> String # showList :: [TimerFormat] -> ShowS # | |
| Eq TimerFormat Source # | |
| Default TimerFormat Source # | |
Defined in Shrun.Configuration.Data.ConsoleLogging.TimerFormat Methods def :: TimerFormat Source # | |
| DecodeTOML TimerFormat Source # | |
Defined in Shrun.Configuration.Data.ConsoleLogging.TimerFormat Methods | |
Parsing
parseTimerFormat :: MonadFail m => m Text -> m TimerFormat Source #
Parse timer format.
timerFormatStr :: IsString a => a Source #
Available TimerFormat strings.
Formatting
formatRelativeTime :: TimerFormat -> RelativeTime -> UnlinedText Source #
Formats a relative time.
formatSeconds :: TimerFormat -> Natural -> UnlinedText Source #
Formats a relative time seconds.