prettyprinter-1.7.1: A modern, easy to use, well-documented, extensible pretty-printer.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Prettyprinter.Render.String

Synopsis

Documentation

renderShowS :: SimpleDocStream ann -> ShowS Source #

Render a SimpleDocStream to a ShowS, useful to write Show instances based on the prettyprinter.

instance Show MyType where
    showsPrec _ = renderShowS . layoutPretty defaultLayoutOptions . pretty