Apache-2.0 licensed by IOG
Maintained by Marcin Szamotulski
This version can be pinned in stack with:nothunks-0.3.0.0@sha256:163432fb48dcb56bd4fce4eb4905fba5684057449d359938526152f721e3ddd5,2807

Module documentation for 0.3.0.0

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.

Changes

Revision history for nothunks

0.3.0 – 2024-08-13

  • Include both Context and Info in ThunkInfo (#54)

0.2.1.0 – 2024-02-06

  • Exported mkThunkInfo.
  • Test support of ghc-9.10.

0.2.1.0 – 2024-02-06

  • Support wherefrom with GHC-9.2 or newer. (Teo Camarasu, #49)

0.2.0 – 2024-01-27

  • Use whereFrom to get source information, which is avialable when the source is compiled with GHC-9.6 (or newer) and with -finfo-table-map (and even more accurate when -fdistinct-constructor-table is passed). For that reason the ThunkInfo type has changed.
  • NoThunks instance for Data.Tuple.Solo.
  • NoThunks instances for Data.Semigroup and Data.Monoid newtype wrappers.

0.1.5 – 2023-10-29

  • NoThunks ThreadId instance.
  • NoThunks Identity instance
  • Fix tests on ghc 9.8. Andreas Abel [email protected]
  • Tested with ghc 8.10 to 9.8.

0.1.4 – 2023-03-27

  • Made cabal flags manual.
  • Support ghc-9.2 to 9.6.
  • ThunkInfo is a newtype.

0.1.3 – 2021-06-28

0.1.2 – 2020-12-03

0.1.1.0 – 2020-09-29

  • Export Context and GWNoThunks
  • Fix typos in Haddocks
  • Improve bounds (and add upper bounds)

0.1.0.0 – 2020-09-09

  • Initial public release