:: Int -> Bool package:ChasingBottoms

isBottom a returns False if a is distinct from bottom. If a equals bottom and results in an exception of a certain kind (see below), then isBottom a = True. If a never reaches a weak head normal form and never throws one of these exceptions, then isBottom a never terminates. The exceptions that yield True correspond to "pure bottoms", i.e. bottoms that can originate in pure code: Assertions are excluded, because their behaviour depends on compiler flags (not pure, and a failed assertion should really yield an exception and nothing else). The same applies to arithmetic exceptions (machine dependent, except possibly for DivideByZero, but the value infinity makes that case unclear as well).