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

rio-prettyprint

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.

Changes

Changelog for rio-prettyprint

0.1.7.0

  • 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.

0.1.6.0

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

0.1.5.0

  • Add Pretty instances for SomeBase Dir and SomeBase File.

0.1.4.0

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

0.1.3.0

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

0.1.2.0

  • Expose data constructor of StyleDoc #8

0.1.1.0

  • 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.

0.1.0.0

  • Initial stable release