diff options
Diffstat (limited to 'Biz/Log.hs')
-rw-r--r-- | Biz/Log.hs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -23,6 +23,7 @@ module Biz.Log -- * Low-level msg, + fmt, br, ) where @@ -57,7 +58,7 @@ msg lvl labels = where -- For systemd-journal, emacs *compilation* buffers, etc. putDumb = putStr <| txt <> "\n" - txt = Text.intercalate gap (label : labels) + txt = fmt (label : labels) (color, label) = case lvl of Good -> (green, "good") Pass -> (green, "pass") @@ -67,6 +68,10 @@ msg lvl labels = Mark -> (magenta, "mark") clear = "\ESC[2K" +-- | Helper function for formatting outputs of labels. +fmt :: [Text] -> Text +fmt = Text.intercalate gap + gap :: Text gap = ": " |