Popularity
7.2
Declining
Activity
0.0
Stable
20
4
6
Monthly Downloads: 9
Programming language: Haskell
License: MIT License
Tags:
Development
Ghci
Latest version: v0.0.2
ghci-pretty alternatives and similar packages
Based on the "ghci" category.
Alternatively, view ghci-pretty alternatives based on common mentions on social networks and blogs.
Do you think we are missing an alternative of ghci-pretty or a related project?
README
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