Skip to content
Pretty print the standard output of default `Show` instances.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status

nicify is a tool for pretty printing the default formatting of Show instances. It is especially useful when dumping data during debugging.


Given main.hs:

data X = A [X] | B String | C (X, X)
  deriving (Show)

main = print $
  A [B "one", B "two", A [ C (B "three", B "three prime"), B "woop woop" ]]

you would typically get:

>>> runhaskell main.hs 
A [B "one",B "two",A [C (B "three",B "three prime"),B "woop woop"]]

not so with nicify:

import Text.Nicify

data Z = A [Z] | B String | C (Z, Z)
  deriving (Show)

main = putStrLn . nicify . show
  $ A [B "one", B "two", A [ C (B "three", B "three prime"), B "woop woop" ]]

results in:

>>> runhaskell main.hs -package nicify-lib
A [
    B "one",
    B "two",
    A [
        C (B "three",
        B "three prime"),
        B "woop woop"

nicify is also available as command line tool, see

You can’t perform that action at this time.