Portability | non-portable (GHC-specific) |
---|---|

Stability | experimental |

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

Safe Haskell | None |

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

- type Prec = Int
- class ApproxShow a where
- approxShowsPrec :: Nat -> Prec -> a -> ShowS
- approxShows :: Nat -> a -> ShowS
- approxShow :: Nat -> a -> String

# Documentation

class ApproxShow a whereSource

approxShowsPrec :: Nat -> Prec -> a -> ShowSSource

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 -> ShowSSource

approxShow :: Nat -> a -> StringSource

Data a => ApproxShow a |