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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Prettyprinter.Render.String

Synopsis

- renderString :: SimpleDocStream ann -> String
- renderShowS :: SimpleDocStream ann -> ShowS

# Documentation

renderString :: SimpleDocStream ann -> String #

Render a `SimpleDocStream` to a `String`.

renderShowS :: SimpleDocStream ann -> ShowS #

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

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