pretty package:optparse-applicative

>>> pretty 1 <+> pretty "hello" <+> pretty 1.234
1 hello 1.234
Overloaded conversion to Doc. Laws:
  1. output should be pretty. :-)
prettyList is only used to define the instance Pretty a => Pretty [a]. In normal circumstances only the pretty function is used.
>>> prettyList [1, 23, 456]
[1, 23, 456]
This is the default layout algorithm, and it is used by show, putDoc and hPutDoc. layoutPretty commits to rendering something in a certain way if the next element fits the layout constraints; in other words, it has one SimpleDocStream element lookahead when rendering. Consider using the smarter, but a bit less performant, layoutSmart algorithm if the results seem to run off to the right before having lots of line breaks.