| Copyright | (c) Nils Anders Danielsson 2004-2022 2024 | 
|---|---|
| License | See the file LICENCE. | 
| Maintainer | http://www.cse.chalmers.se/~nad/ | 
| Stability | experimental | 
| Portability | non-portable (GHC-specific) | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
Test.ChasingBottoms.ApproxShow
Description
Functions for converting arbitrary (non-function, partial, possibly infinite) values into strings.
Synopsis
- type Prec = Int
- class ApproxShow a where- approxShowsPrec :: Nat -> Prec -> a -> ShowS
- approxShows :: Nat -> a -> ShowS
- approxShow :: Nat -> a -> String
 
Documentation
class ApproxShow a where Source #
Minimal complete definition
Methods
approxShowsPrec :: Nat -> Prec -> a -> ShowS Source #
The Data instance of ApproxShow makes sure that
 approxShowsPrec nshowsPrec, with the following differences:
- After nlevels 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 #
Instances
| Data a => ApproxShow a Source # | |
| Defined in Test.ChasingBottoms.ApproxShow | |