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

Modulehw-fingertree-0.1.2.1Haskell2010

HaskellWorks.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
Synopsis

Intervals

datadata Interval v

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

Constructors

Instances6Eq, Ord, Show, Generic, NFData, Rep

Interval maps

newtypenewtype IntervalMap v a

Map of closed intervals, possibly with duplicates. The Foldable and Traversable instances process the intervals in lexicographical order.

Constructors

Instances8Functor, Foldable, Traversable, Generic, Semigroup, Monoid, …
valueinsert :: Ord v => Interval v -> a -> IntervalMap v a -> IntervalMap v a

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

Searching