- Fix a problem with the
pHPrint
function incorrectly outputting a trailing newline to stdout, instead of the handle you pass it. #118 - Add a web app where you
can play around with
pretty-simple
in your browser. #116. This took a lot of hard work by @georgefst!
- Make the pretty-printed output with
outputOptionsCompact
enabled a little more compact. #110. Thanks @juhp! - Add a
--compact
/-C
flag to thepretty-simple
executable that enablesoutputOptionsCompact
. #111. Thanks again @juhp! - Add
pTraceWith
andpTraceShowWith
toDebug.Pretty.Simple
. #104. Thanks @LeviButcher!
- Fix a regression which arose in 4.0, whereby excess spaces would be inserted for unusual strings like dates and IP addresses. #105
- Attach warnings to debugging functions, so that they're easy to find and remove. #103
- Some minor improvements to the CLI tool:
- Expand
OutputOptions
: - Significant internal rewrite of printing code, to make use of the prettyprinter
library. The internal function
layoutString
can be used to integrate with otherprettyprinter
backends, such as prettyprinter-lucid for HTML output. #67
- Add an output option to print escaped and non-printable characters literally when outputting strings. #68 and #69 Thanks Joe Hermaszewski (@expipiplus1)!
- Fix a bug that messes up printing identifiers with
'
in the name. Now identifiers likedata Don't = Don't
show up properly. #65 Thanks George Thomas (@georgefst)!
- Added a
pPrintString
function for pretty-printing aString
that is the output ofshow
. Implemented in #54. Thanks sureyeaah! - Fix build on GHC-7.10.3. #55. Thanks sjakobi.
- Numbers are now highlighted in green by default. Implemented in #51. Thanks lawrencebell!
- pretty-simple now escapes non-printable characters by default. A field
called
outputOptionsEscapeNonPrintable
has been added toOutputOptions
to control this behavior. Implemented in #44. Thanks dminuoso! - pretty-simple now checks the output
Handle
to determine whether to print in color when using functions likepPrint
. This makes it so that you can redirect output to a file on disk and still be able to read the output frompPrint
! Implemented in #47. Thanks metiulekm! - Add functions like
pHPrint
for specifying theHandle
to output to. Added in #47.
- Fixed a bug where the parser failed to parse escaped quotation marks in string literals. Thanks Andreas!
- Fixed a bug with a missing space after strings. Thanks again Andrew!
- Add a command line flag
--color
to be able to set whether to use colors for a dark background (--color dark-bg
), a light background (--color light-bg
), or no color (--color no-color
). This is from great work by Andrew! - Made parsing/printing lazy - pretty-printing will now output strings continuously as they're read, handling potentially infinite input.
-
Add a small command-line program that will pretty print anything from stdin called
pretty-print
. It can be installed to~/.local/bin
if you enable the flagbuildexe
like so:$ stack install pretty-simple-2.0.2.1 --flag pretty-simple:buildexe
When you run it, you can paste something you want formatted on stdin, then press Ctrl-D. It will print the formatted version on stdout:
$ pretty-simple [(Just 3, Just 4)] ^D [ ( Just 3 , Just 4 ) ]
- Fix a problem with the pTraceShow functions not working correctly.
- Added the
Debug.Pretty.Simple
that exports functions that work likeDebug.Trace
.