Documentation

The type of half-integers. The bounds are determined by the type
variable. For example, HalfInteger Int has a range half as large
as Int itself. (The Bounded instance correctly reflects this.)
Note that HalfInteger Integer is unbounded, like Integer
itself.

HalfInteger values can be constructed as numeric literals
(e.g., 5 :: HalfInteger Int), by conversions such as
fromInteger or fromIntegral, or by several functions in this
module. Another common pattern is to write (say) 5 + half to
represent 5 1/2. Indeed, the Show instance represents values
in this way.

Beware: The half-integers are not closed under multiplication!
For example, half * half should yield 1/4, which is not a valid
HalfInteger. (Currently it yields zero.) Addition and
subtraction, however, are closed, and thus yield exact results.