Portability | H98 |
---|---|
Stability | experimental |
Maintainer | Douglas Burke |
Safe Haskell | Safe-Inferred |
This module defines an extension of the Show
class for displaying
multi-line values. It serves the following purposes:
Documentation
class Show sh => ShowLines sh whereSource
ShowLines is a type class for values that may be formatted in multi-line displays.
showls :: String -> sh -> ShowSSource
Multi-line value display method
Create a multiline displayable form of a value, returned
as a ShowS
value. The default implementation behaves just
like a normal instance of Show
.
This function is intended to allow the calling function some control of multiline displays by providing:
- the first line of the value is not preceded by any text, so it may be appended to some preceding text on the same line,
- the supplied line break string is used to separate lines of the formatted text, and may include any desired indentation, and
- no newline is output following the final line of text.