nothunks: Examine values for unexpected thunks

[ apache, development, library ] [ Propose Tags ]

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.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
bytestring

Provide instances for bytestring

Enabled
text

Provide instances for text

Enabled
vector

Provide instances for vector

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.2.0, 0.2.1.0, 0.2.1.1, 0.3.0.0
Change log CHANGELOG.md
Dependencies base (>=4.12 && <5), bytestring (>=0.10 && <0.13), containers (>=0.5 && <0.8), ghc-heap, stm (>=2.5 && <2.6), text (>=1.2 && <1.3 || >=2 && <2.2), time (>=1.5 && <1.13), vector (>=0.12 && <0.14), wherefrom-compat (>=0.1.1 && <0.2) [details]
License Apache-2.0[multiple license files]
Copyright 2018-2024 Input Output Global Inc (IOG)
Author IOG
Maintainer Marcin Szamotulski <coot@coot.me>
Category Development
Bug tracker https://github.com/input-output-hk/nothunks
Source repo head: git clone https://github.com/input-output-hk/nothunks
Uploaded by IOHK at 2024-07-29T09:25:02Z
Distributions Arch:0.2.0, LTSHaskell:0.1.5, NixOS:0.1.5, Stackage:0.3.0.0
Reverse Dependencies 4 direct, 1 indirect [details]
Downloads 18380 total (331 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for nothunks-0.2.1.1

[back to package description]

nothunks

CI Tests

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.