The ghci-pretty package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Warnings:

a tiny package that combines the ipprint package and the hscolour package to provide colored pretty-printing in ghci


[Skip to ReadMe]

Properties

Versions0.0.1, 0.0.1, 0.0.2
Change logNone available
Dependenciesbase (==4.*), hscolour (>=1.20), ipprint (>=0.5) [details]
LicenseMIT
CopyrightCopyright (c) 2014 Lars Kuhtz <lakuhtz@gmail.com>
AuthorLars Kuhtz
MaintainerLars Kuhtz <lakuhtz@gmail.com>
CategoryDevelopment
Home pagehttps://github.com/larskuhtz/ghci-pretty
Source repositoryhead: git clone https://github.com/larskuhtz/ghci-pretty
UploadedThu Nov 13 20:31:16 UTC 2014 by larsk

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for ghci-pretty-0.0.1

[back to package description]

Build Status

A tiny package that combines the ipprint package and the hscolour package to provide colored pretty-printing in ghci.

Here is all the code from this package:

module IPPrint.Colored
( cpprint
) where

import IPPrint
import Language.Haskell.HsColour
import Language.Haskell.HsColour.Colourise
import Language.Haskell.HsColour.Output

cpprint :: Show a => a -> IO ()
cpprint = putStrLn . hscolour (TTYg XTerm256Compatible) defaultColourPrefs False False "" False . pshow

Usage

cabal update
cabal install ghci-pretty

Add the following lines to your ghci.conf file:

-- Pretty printing of it
import IPPrint.Colored
:set -interactive-print=IPPrint.Colored.cpprint
:def cp (\_ -> return ":set -interactive-print=IPPrint.Colored.cpprint")
:def ncp (\_ -> return ":set -interactive-print=print")

Now you can enable colored pretty-printing in ghci with the commmand

:cp

The following command turns colored pretty-printing off again

:ncp