Omari Norman | 9 Jun 20:10 2013

[ANNOUNCE] rainbow - print colored text on UNIX-like systems

Hi all,

rainbow is a simple package to help you print colored text on UNIX-like systems. It's different from packages like terminfo (upon which it is based) and ansi-terminal in two ways. First, rainbow assumes you print text one "chunk" at a time. The properties of the terminal are reset with every chunk. That way you do not need to remember what the terminal's properties were before you print a new chunk. One chunk does not affect the next chunk. It's a state-free model that fits in well with functional programming.

Second, rainbow makes it easy to use both 8- and 256-color terminals.

Some sample things you can do in ghci:

:set -XOverloadedStrings
:m +System.Console.Rainbow
putChunkLn $ "Hello bold green world!" <> f_green <> bold
putChunkLn $ "Red on 8-color, pink on 256-color" <> f_red <> c256_f_201
mapM_ putChunk ["green on blue" <> f_green <> b_blue, " ", "blue on green" <> f_blue <> b_green, "\n"]

So, add some color to things:

http://hackage.haskell.org/package/rainbow
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Mateusz Kowalczyk | 9 Jun 20:27 2013
Picon

Re: [ANNOUNCE] rainbow - print colored text on UNIX-like systems


On 09/06/13 19:10, Omari Norman wrote:
> Hi all,
> 
> rainbow is a simple package to help you print colored text on
> UNIX-like systems. It's different from packages like terminfo (upon
> which it is based) and ansi-terminal in two ways. First, rainbow
> assumes you print text one "chunk" at a time. The properties of the
> terminal are reset with every chunk. That way you do not need to
> remember what the terminal's properties were before you print a new
> chunk. One chunk does not affect the next chunk. It's a state-free
> model that fits in well with functional programming.
> 
> Second, rainbow makes it easy to use both 8- and 256-color
> terminals.
> 
> Some sample things you can do in ghci:
> 
> :set -XOverloadedStrings :m +System.Console.Rainbow putChunkLn $
> "Hello bold green world!" <> f_green <> bold putChunkLn $ "Red on
> 8-color, pink on 256-color" <> f_red <> c256_f_201 mapM_ putChunk
> ["green on blue" <> f_green <> b_blue, " ", "blue on green" <>
> f_blue <> b_green, "\n"]
> 
> So, add some color to things:
> 
> http://hackage.haskell.org/package/rainbow
> 
> 
> 
> _______________________________________________ Haskell-Cafe
> mailing list Haskell-Cafe <at> haskell.org 
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
For whatever reason, your Haddock documentation is not visible on Hackage.

--

-- 
Mateusz K.
Simon Hengel | 9 Jun 20:38 2013
Picon

Re: [ANNOUNCE] rainbow - print colored text on UNIX-like systems

Hi,

> For whatever reason, your Haddock documentation is not visible on Hackage.

Haddock documentation is created by a batch job and will show up
eventually ;).

Cheers,
Simon
"Gabríel A. Pétursson" | 9 Jun 20:42 2013
Picon

Re: [ANNOUNCE] rainbow - print colored text on UNIX-like systems

On 2013-06-09 18:27, Mateusz Kowalczyk wrote:
> For whatever reason, your Haddock documentation is not visible on Hackage.

It takes some time for Hackage to generate the package's documentation.
It's an automated system that's run periodically.

Gmane