This library provides a type and combinators for show functions using functional lists.
Exported Datatypes: ShowS
Exported Functions: showChar, showParen, shows, showString
type ShowS
= String -> String
The type synonym ShowS
represents strings as difference lists.
Composing functions of this type allows concatenation of lists
in constant time.
showString
:: String -> String -> String
Prepend a string
showChar
:: Char -> String -> String
Prepend a single character
showParen
:: Bool -> (String -> String) -> String -> String
Surround the inner show function with parentheses if the first argument
evaluates to True
.
shows
:: Show a => a -> String -> String
Convert a value to ShowS
using the standard show function.