Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utility functions for formatting data.
Synopsis
- showText :: Show a => a -> Text
- colored :: Color -> Text -> Text
- rankColored :: RankColor -> Text -> Text
- convertRankColor :: RankColor -> Color
- diffColored :: Int -> Text
- indent :: Text
- fmtTimeConsumed :: Int -> Text
- fmtMemoryConsumed :: Int -> Text
- fmtDiffTime :: NominalDiffTime -> Text
- plainCell :: Text -> Cell
- coloredCell :: Color -> Text -> Cell
- blankCell :: Cell
- ratingCell :: Rating -> Cell
- differenceCell :: Int -> Cell
- verdictCell :: Testset -> Int -> Maybe Points -> Maybe Verdict -> Cell
Documentation
colored :: Color -> Text -> Text Source #
colored
color text
wraps some text around SGR codes to display it in
the given color.
convertRankColor :: RankColor -> Color Source #
diffColored :: Int -> Text Source #
Like differenceCell
but returns a Text
rather than a Cell
.
fmtTimeConsumed :: Int -> Text Source #
fmtMemoryConsumed :: Int -> Text Source #
fmtDiffTime :: NominalDiffTime -> Text Source #
Returns an approximate and human-friendly time difference.
Possible options are: * "just now" * "5 seconds ago" * "X seconds ago" where X is a multiple of 10 * "X minutes ago"
ratingCell :: Rating -> Cell Source #
differenceCell :: Int -> Cell Source #
differenceCell
diff
colors a number red, white or green, depending on
whether it's negative, 0, or positive.