BSD-3-Clause licensed by Edward Kmett
Maintained by [email protected]
This version can be pinned in stack with:intervals-0.9.2@sha256:c689195931b743141d21ec464dbfe2848fe9dbd97fa2ae4bc667ecdf7756721f,2352
Used by 1 package in lts-22.26(full list with versions):


Hackage Build Status

Basic interval arithmetic

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on

-Edward Kmett


0.9.2 [2021.02.17]

  • Export (/=!) and (/=?) operators.
  • The build-type has been changed from Custom to Simple. To achieve this, the doctests test suite has been removed in favor of using cabal-docspec to run the doctests.

0.9.1 [2020.01.29]

  • Add Semigroup instances for the Interval types in Numeric.Interval, Numeric.Interval.Kaucher, and Numeric.Interval.NonEmpty. Add a Monoid instance for the Interval type in Numeric.Interval.

0.9 [2019.05.10]

  • Remove the Foldable instances for the Interval types from Numeric.Interval and Numeric.Interval.NonEmpty.


  • Support doctest-0.12


  • Eq and Ord instances are now structural
  • Deprecate elem and notElem in favor of member and nonMember
  • Add iquot, irem, idiv, and imod functions
  • Relax Fractional constraint in deflate to Num
  • Revamp Setup.hs to use cabal-doctest. This makes it build with Cabal-2.0, and makes the doctests work with cabal new-build and sandboxes.


  • Redundant constraint cleanup
  • GHC 8 support
  • Added a flag for building with ‘herbie’

  • Redundant import cleanup


  • Now compatible with GHC 7.10.1-rc1
  • Fixed a number of broken #if pragmas, fixing previously missing instances.

  • Removed a couple of unnecessary Fractional constraints.


  • Corrected the definition of mignitude.
  • Added a notion of distance between intervals


  • Added Numeric.Interval.Exception. For consistency, we tend to throw exceptions now instead of rely on NaN when working with empty intervals.

  • Misc doctest fixes.


  • Added interval to facilitate the construction of known non-empty intervals.


  • The default Numeric.Interval now deals more conventionally with empty intervals.
  • The old “Kaucher directed interval” behavior is available as Numeric.Interval.Kaucher.
  • Strictly Non-Empty intervals are now contained in Numeric.Interval.NonEmpty
  • Renamed bisection to bisect.
  • Added bisectIntegral.


  • Added clamp


  • Distributive Interval


  • Removed dependency on numeric-extras