ghci-pretty-0.0.2: colored pretty-printing within ghci

CopyrightCopyright © 2014 Lars Kuhtz <lakuhtz@gmail.com>
LicenseMIT
MaintainerLars Kuhtz <lakuhtz@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

IPPrint.Colored

Description

This module combines the ipprint package and the hscolour package to provide colored pretty-printing in ghci.

Usage

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

Documentation

cpprint :: Show a => a -> IO () Source