Copyright | (c) Nils Anders Danielsson 2004-2017 |
---|---|

License | See the file LICENCE. |

Maintainer | http://www.cse.chalmers.se/~nad/ |

Stability | experimental |

Portability | non-portable (GHC-specific) |

Safe Haskell | None |

Language | Haskell98 |

Functions for converting arbitrary (non-function, partial, possibly infinite) values into strings.

- type Prec = Int
- class ApproxShow a where

# Documentation

class ApproxShow a where Source #

approxShowsPrec :: Nat -> Prec -> a -> ShowS Source #

The `Data`

instance of `ApproxShow`

makes sure that

behaves (more or less) like the derived
version of `approxShowsPrec`

n`showsPrec`

, with the following differences:

- After
`n`

levels of descent into a term the output is replaced by`"_"`

. - All detectable occurences of bottoms are replaced by
`"_|_"`

. - Non-bottom functions are displayed as
`"<function /= _|_>"`

.

approxShows :: Nat -> a -> ShowS Source #

approxShow :: Nat -> a -> String Source #

Data a => ApproxShow a Source # | |