module Terminal (
- hPutRedLn,
- putGreenLn)
+ putGreenLn,
+ report_error)
where
import Control.Monad.IO.Class (MonadIO(..))
ColorIntensity( Vivid ),
ConsoleLayer( Foreground ),
setSGR )
-import System.IO ( Handle, hPutStrLn )
+import System.IO ( Handle, hPutStrLn, stderr )
-- | Perform a computation (anything in MonadIO) with the given
-- graphics mode(s) enabled. Revert to the previous graphics mode
-- consistency with e.g. putStrLn.
putGreenLn :: String -> IO ()
putGreenLn = with_color Green . putStrLn
+
+-- | Report an error (to stderr).
+report_error :: String -> IO ()
+report_error = hPutRedLn stderr