BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:heaps-0.4@sha256:66b19fcd813b0e4db3e0bac541bd46606c3b13d3d081d9f9666f4be0f5ff14b8,1410

Module documentation for 0.4

Depends on 1 package(full list with versions):
Used by 5 packages in nightly-2024-06-13(full list with versions):


Hackage Build Status

This package provides Brodal/Okasaki heaps. These are asymptotically optimal purely functional heaps.

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.4 [2021.02.17]

  • heaps now always exports a null function that is specialized to Heap, i.e.,

    null :: Heap a -> Bool

    Previously, this specialized versions of null was only exported with GHC 7.8 or older, and for more recent GHCs, the Data.Foldable version was exported instead. The exported API is now uniform across all supported versions of GHC.

  • Export adjustMin. [2019.02.05]

  • Change to build-type: Simple, and drop the doctests test suite. This was done in an effort to make heaps’ dependency footprint as minimal as possible, since heaps is used to bootstrap shake.
  • Fix the Haddocks for span.

0.3.6 [2018.01.18]

  • Add Semigroup instance for Heap.


  • Support doctest-0.12

  • Fix a typo in the doctests for mapMonotonic


  • Add Bifunctor Entry instance
  • 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.


  • Remove redundant constraints
  • Build warning-free on GHC 8.0-rc1

  • Haddock fix


  • Build without warnings on GHC 7.10
  • Overload Foldable null and length on GHC 7.10+


  • Explicit nominal role annotation

  • Nicer formatting of the haddocks