+-- | Terminal output functions for displaying informational
+-- messages. The output is color-coded according to severity, and is
+-- designed at the moment for consoles with a dark background.
+--
module Network.Services.TSN.Terminal (
display_debug,
display_error,
-- | Display debug text on the console. Don't automatically append a
--- newline in case the raw text is needed for, uh, debugging.
+-- newline in case the raw text is needed for, uh, debugging. The
+-- text color is not altered.
--
display_debug :: String -> IO ()
display_debug = putStr
--- | Display an informational message on the console.
+-- | Display an informational message on the console in cyan.
--
display_info :: String -> IO ()
display_info = hPutStrColorLn stdout Cyan
--- | Display a warning on the console. Uses stderr instead of stdout.
+-- | Display a warning on the console in yello. Uses stderr instead of
+-- stdout.
--
display_warning :: String -> IO ()
display_warning = hPutStrColorLn stderr Yellow
--- | Display an error on the console. Uses stderr instead of stdout.
+-- | Display an error on the console in red. Uses stderr instead of
+-- stdout.
--
display_error :: String -> IO ()
display_error = hPutStrColorLn stderr Red