HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulefingertree-0.1.6.3Haskell2010

Data.IntervalMap.FingerTree

Interval maps implemented using the FingerTree type, following section 4.8 of

An amortized running time is given for each operation, with n referring to the size of the priority queue. These bounds hold even in a persistent (shared) setting.

Note: Many of these operations have the same names as similar operations on lists in the Prelude. The ambiguity may be resolved using either qualification or the hiding clause.

Contents
  1. Intervals
  2. Interval maps
  3. Searching
  4. Extraction
Synopsis
  • Packagefingertree-0.1.6.3
  • Exports15
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFingerTree.hs

Intervals

datadata Interval v

A closed interval. The lower bound should be less than or equal to the upper bound.

Constructors

  • Interval v v

    Lower and upper bounds of the interval.

Instances7Eq, Ord, Read, Show, Generic, NFData, …

Interval maps

newtypenewtype IntervalMap v a

Map of closed intervals, possibly with duplicates.

Instances11Functor, Foldable, Traversable, Eq, Ord, Show, …
valueinsert :: Ord v => Interval v -> a -> IntervalMap v a -> IntervalMap v a

O(log n). Insert an interval and associated value into a map. The map may contain duplicate intervals; the new entry will be inserted before any existing entries for the same interval.

Searching

Extraction