| Portability | non-portable |
|---|---|
| Stability | experimental |
| Maintainer | generics@haskell.org |
Generics.EMGM.Functions.Show
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.
Documentation
The type of a generic function that takes a constructor-type argument, a
number (precedence), and a value and returns a ShowS function.
Instances
| Generic Show | |
| Rep Show String | Ad-hoc instance for strings |
| Rep Show () | Ad-hoc instance for |
| Rep Show a => Rep Show [a] | Ad-hoc instance for lists |
| (Rep Show a, Rep Show b) => Rep Show (a, b) | Ad-hoc instance for |
| (Rep Show a, Rep Show b, Rep Show c) => Rep Show (a, b, c) | Ad-hoc instance for |
| (Rep Show a, Rep Show b, Rep Show c, Rep Show d) => Rep Show (a, b, c, d) | Ad-hoc instance for |
| (Rep Show a, Rep Show b, Rep Show c, Rep Show d, Rep Show e) => Rep Show (a, b, c, d, e) | Ad-hoc instance for |
| (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) | Ad-hoc instance for |
| (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) | Ad-hoc instance for |