hindent-6.0.0: Extensible Haskell pretty printer
Safe HaskellSafe-Inferred
LanguageHaskell2010

HIndent.Pretty.Combinators.Outputable

Description

Printer combinators for printing values of types implementing Outputable.

Synopsis

Documentation

output :: (HasCallStack, Outputable a) => a -> Printer () Source #

Prints the given value using the type's Outputable implementation.

The use of this function should be avoided for these reasons:

  • It may raise an error due to showPpr returning a String containing ns. Use newline to print ns.
  • ghc-lib-parser may change a type's implementation of Outputable, causing a sudden test failure. It becomes a maintaince burden.
  • All comments of the node's children are ignored.

showOutputable :: Outputable a => a -> String Source #

Converts the given value to a String.