title: Pretty Printing in Haskell in 2017
body: <p>The final paragraph of Chapter 5 of <a href="http://book.realworldhaskell.org/read/writing-a-library-working-with-json-data.html" rel="nofollow noreferrer">Real World Haskell</a> recommends <code>Text.PrettyPrint.HughesPJ</code> for pretty printing rather than custom show types, and provides the <a href="http://book.realworldhaskell.org/read/bibliography.html#bib.hughes95" rel="nofollow noreferrer">originating academic paper</a> for clarifications.  A comment on that also linked to:</p>
  
  <ul>
  <li><a href="https://hackage.haskell.org/package/FPretty-1.0/docs/Text-PrettyPrint-FPretty.html" rel="nofollow noreferrer">https://hackage.haskell.org/package/FPretty-1.0/docs/Text-PrettyPrint-FPretty.html</a></li>
  <li><a href="http://www.cs.kent.ac.uk/people/staff/oc/pretty.html" rel="nofollow noreferrer">http://www.cs.kent.ac.uk/people/staff/oc/pretty.html</a></li>
  </ul>
  
  <p>I've looked for examples using Text.PrettyPrint.HughesPJ, and have not found much online.  My questions are:</p>
  
  <ol>
  <li>Is there a module in the Haskellverse approaching the python ease of "from pprint import pprint as pp; pp(myjson)"?  </li>
  <li>How can I use HughesPJ in a minimum viable example sense that will generate output similar to python's pretty print (in terms of spaces, indentation, etc., on a json object)?</li>
  </ol>