ChasingBottoms-1.3.0.2: For testing partial and infinite values.

Portabilitynon-portable (GHC-specific)
Stabilityexperimental
Maintainerhttp://www.cse.chalmers.se/~nad/

Test.ChasingBottoms.ApproxShow

Description

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

Synopsis

Documentation

type Prec = IntSource

Precedence level.

class ApproxShow a whereSource

Methods

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

The Data instance of ApproxShow makes sure that approxShowsPrec n behaves (more or less) like the derived version of 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

Instances

Data a => ApproxShow a