This repository was archived by the owner on Mar 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
352 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
.stack-work/ | ||
.stack-build/ | ||
dist-newstyle/ | ||
cmt.cabal | ||
.cmt.bkp | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
module Cmt.IO.CLI where | ||
|
||
import ClassyPrelude | ||
|
||
import Data.Text.IO (hPutStrLn) | ||
import System.Console.ANSI (Color (Blue, Magenta, Red, Yellow), ColorIntensity (Dull), | ||
ConsoleLayer (Foreground), SGR (Reset, SetColor), hSetSGR) | ||
|
||
blank :: IO () | ||
blank = putStrLn "" | ||
|
||
message :: Text -> IO () | ||
message msg = do | ||
hSetSGR stdout [SetColor Foreground Dull Blue] | ||
hPutStrLn stdout msg | ||
hSetSGR stdout [Reset] | ||
|
||
mehssage :: Text -> IO () | ||
mehssage msg = do | ||
hSetSGR stdout [SetColor Foreground Dull Yellow] | ||
hPutStrLn stdout msg | ||
hSetSGR stdout [Reset] | ||
|
||
header :: Text -> IO () | ||
header msg = do | ||
hSetSGR stdout [SetColor Foreground Dull Magenta] | ||
hPutStrLn stdout $ "*** " ++ msg ++ " ***" | ||
hSetSGR stdout [Reset] | ||
|
||
errorMessage :: Text -> IO () | ||
errorMessage msg = do | ||
hSetSGR stderr [SetColor Foreground Dull Red] | ||
hPutStrLn stderr msg | ||
hSetSGR stderr [Reset] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.