BSD-3-Clause licensed by Edward Kmett
Maintained by [email protected]
This version can be pinned in stack with:intervals-0.9.1@sha256:9b616d3102b0d48e897387cb24b5a9d17d60f3a270ced8fcf1b96e6962d1d52d,2765
Used by 1 package in lts-15.3(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.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