|
Generics.EMGM.Functions.Show | Portability | non-portable | Stability | experimental | Maintainer | generics@haskell.org |
|
|
|
Description |
Summary: Generic functions that convert values to readable strings.
The functions in this module involve generically producing a string from a
value of a supported datatype. The functions showsPrec and show are
modeled after those in the class Show, and shows after the related
function of the same name.
The underlying unparser is designed to be as similar to deriving Show as
possible. Refer to documentation in Text.Show for details.
Since this library does not have access to the syntax of a data
declaration, it relies on ConDescr for information. It is important that
ConDescr accurately describe, for each constructor, the name, arity, record
labels (in same order as declared) if present, and fixity.
See also Generics.EMGM.Functions.Read.
|
|
Synopsis |
|
|
|
Documentation |
|
|
The type of a generic function that takes a constructor-type argument, a
number (precedence), and a value and returns a ShowS function.
| Constructors | | Instances | Generic Show | Rep Show String | Rep Show () | Rep Show a => Rep Show ([] a) | (Rep Show a, Rep Show b) => Rep Show ((,) a b) | (Rep Show a, Rep Show b, Rep Show c) => Rep Show ((,,) a b c) | (Rep Show a, Rep Show b, Rep Show c, Rep Show d) => Rep Show ((,,,) a b c d) | (Rep Show a, Rep Show b, Rep Show c, Rep Show d, Rep Show e) => Rep Show ((,,,,) a b c d e) | (Rep Show a, Rep Show b, Rep Show c, Rep Show d, Rep Show e, Rep Show f) => Rep Show ((,,,,,) a b c d e f) | (Rep Show a, Rep Show b, Rep Show c, Rep Show d, Rep Show e, Rep Show f, Rep Show h) => Rep Show ((,,,,,,) a b c d e f h) |
|
|
|
|
:: Rep Show a | | => Int | Operator precedence of the enclosing context (a number from 0 to 11).
| -> a | The value to be converted to a String.
| -> ShowS | | Convert a value to a readable string starting with the operator precedence
of the enclosing context.
|
|
|
|
A variant of showsPrec with the minimum precedence (0).
|
|
|
A variant of shows that returns a String instead of ShowS.
|
|
Produced by Haddock version 2.4.2 |