BSD-3-Clause licensed by Michael Snoyman
Maintained by [email protected]
This version can be pinned in stack with:rio-prettyprint-,1428


rio-prettyprint is a Haskell package that provides a library that combines the logging capabilities of the rio package with the pretty printing capabilities of the annotated-wl-pprint package.

Documents can be annotated with an optional style from a set of named styles, and the style associated with each named style can be specified as a list of ANSI Select Graphic Rendition (SGR) commands. These commands are represented by the constructors of a type provided by the ansi-terminal-types package

The library also provides:

  • a type that represents a simple, non-customisable environments that provide pretty logging functionality; and
  • a type that represents pretty exceptions.


Changelog for rio-prettyprint

  • Add Arch and OS instances of Pretty.

  • Add prettyThrowIO and prettyThrowM, to throw an exception as a PrettyException.
  • Add ppException, to provide the prettiest available information about an exception.
  • Add prettyGeneric and prettyWith for greater flexibility with pretty logging.
  • Add blankLine.

  • Add mkBulletedList for greater flexibility in the format of such lists.
  • Improve Haddock documentation.

  • Add SomeBase Dir and SomeBase File instances of Pretty.

  • Add string and mkNarrativeList.
  • The PrettyException instance of Show is now derived. displayException is now defined, as the displayException of the inner exception.

  • Add SimplePrettyApp, mkSimplePrettyApp and runSimplePrettyApp, which facilitate the provision, and use, of a basic environment including pretty printing functionality.
  • Add PrettyException representing pretty exceptions.

  • Expose data constructor of StyleDoc #8

  • Add Debug, Info and OtherLevel data constructors to type Style (intended to be used like the existing Warning and Error constructors) and a logLevelToStyle function.
  • Add Secondary and Highlight data constructors to type Style.
  • defaultStyles now includes defaults for the new Style values, corresponding to those used by the rio package in its logging output.

  • Initial stable release