Skip to content

joom/chalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chalk

Simple terminal string styling in Haskell, in the style of JavaScript's sindresorhus/chalk and sindresorhus/ansi-styles.

Installation

cabal install chalk

Usage

Styles

(Image borrowed from sindresorhus/ansi-styles.) Use any of the styling functions above to get the effect you want.

Since these are functions, you can compose them as you like.

import System.Console.Chalk

main = do
  putStrLn $ green "This is going to be green."
  putStrLn $ (underline . blue) "This is going to be blue and underlined."

The type of the styling functions is (Monoid m, IsString m) => m -> m, so you can use any type that has an instance of Monoid and IsString, which probably covers what you will use this for.

License

MIT

About

Simple terminal string styling in Haskell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published