@hackage nothunks0.3.2
Examine values for unexpected thunks
Categories
License
Apache-2.0
Maintainer
Marcin Szamotulski <coot@coot.me>
Links
Versions
Installation
Dependencies (10)
- base >=4.12 && <5
- bytestring >=0.10 && <0.13
- containers >=0.5 && <0.9
- data-array-byte
- ghc-heap
- stm >=2.5 && <2.6 Show all…
Dependents (85)
@cardano/ouroboros-network, @cardano/ouroboros-consensus-diffusion, @cardano/io-sim, @hackage/strict-mvar, @cardano/cardano-slotting, @cardano/ouroboros-consensus-byron, Show all…
Package Flags
bytestring
(on by default)
Provide instances for bytestring
text
(on by default)
Provide instances for text
vector
(on by default)
Provide instances for vector
nothunks
Long lived application data typically should not contain any thunks. This library can be used to examine values for unexpected thunks, which can then be used in assertions. This can be invaluable in avoiding memory leaks, or tracking down existing ones.
See my presentation MuniHac 2020: Being lazy without being bloated for an overview, motivating the library and explaining how it is intended to be used and how it works internally.
nothunks will try to get source information from info tables. For that one
needs to use GHC 9.2 or newer and compile the code with
-finfo-table-map. More precise information will be available if
-fdistinct-constructor-tables flag is used as well.