| 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
- timerFormatMeta :: IsString a => (Bool, [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
| Bounded TimerFormat Source # | |
| Enum TimerFormat Source # | |
Defined in Shrun.Configuration.Data.ConsoleLogging.TimerFormat Methods succ :: TimerFormat -> TimerFormat # pred :: TimerFormat -> TimerFormat # toEnum :: Int -> TimerFormat # fromEnum :: TimerFormat -> Int # enumFrom :: TimerFormat -> [TimerFormat] # enumFromThen :: TimerFormat -> TimerFormat -> [TimerFormat] # enumFromTo :: TimerFormat -> TimerFormat -> [TimerFormat] # enumFromThenTo :: TimerFormat -> TimerFormat -> TimerFormat -> [TimerFormat] # | |
| Show TimerFormat Source # | |
Defined in Shrun.Configuration.Data.ConsoleLogging.TimerFormat Methods showsPrec :: Int -> TimerFormat -> ShowS # show :: TimerFormat -> String # showList :: [TimerFormat] -> ShowS # | |
| Eq TimerFormat Source # | |
| Pretty 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.
timerFormatMeta :: IsString a => (Bool, [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.