deepseq

Deep evaluation of data structures

Version on this page:1.3.0.2
LTS Haskell 22.17:1.4.8.1
Stackage Nightly 2024-04-18:1.5.0.0
Latest on Hackage:1.5.0.0

See all snapshots deepseq appears in

BSD-3-Clause licensed
Maintained by [email protected]
This version can be pinned in stack with:deepseq-1.3.0.2@sha256:d3f25d78fa8ba802dc84348fa64ff691712739076f76d23298a6a2bbb82cbcc9,1864

Module documentation for 1.3.0.2

This package provides methods for fully evaluating data structures ("deep evaluation"). Deep evaluation is often used for adding strictness to a program, e.g. in order to force pending exceptions, remove space leaks, or force lazy I/O to happen. It is also useful in parallel programs, to ensure pending work does not migrate to the wrong thread.

The primary use of this package is via the deepseq function, a "deep" version of seq. It is implemented on top of an NFData typeclass ("Normal Form Data", data structures with no unevaluated components) which defines strategies for fully evaluating different data types.

If you want to automatically derive NFData instances via the GHC.Generics facility, there is a companion package deepseq-generics which builds on top of this package.