Strict GC'd imperative object-oriented programming with cheap pointers.

Version on this page:0.1.1@rev:2
LTS Haskell 22.26:0.1.9@rev:2
Stackage Nightly 2024-06-19:0.1.9@rev:2
Latest on Hackage:0.1.9@rev:2

See all snapshots structs appears in

BSD-3-Clause licensed by Edward A. Kmett
Maintained by Edward A. Kmett
This version can be pinned in stack with:structs-0.1.1@sha256:9a34b29a36e533bc9036ff11e1c3a4a508d97ae2fbc71c12b9a4b213a4ad2fed,2596


Hackage Build Status

This package explores strict mutable data structures in Haskell.

In particular, pointer-based data structures are effectively ‘half price’ due to the encoding used.

However, the result is that if you use the slot and field system wrong, you can and will SEGFAULT.

This means the Internal modules are very much internal.

Some documentation is available at

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



  • Add a library dependency in the doctests test suite


  • Add compare-and-swap support for struct slots
  • Add Data.Struct.TH, which provides Template Haskell support for generating structs
  • Remove unneeded proxy argument to struct
  • Add a type parameter to Order
  • 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.


  • Repository initialized
  • Added structures for list labeling, order-maintenance, and link-cut trees.