Heap package:ghc-lib-parser

With this module, you can investigate the heap representation of Haskell values, i.e. to investigate sharing and lazy evaluation.
The program's heap is reaching its limit, and the program should take action to reduce the amount of live data it has. Notes:
  • It is undefined which thread receives this exception. GHC currently throws this to the same thread that receives UserInterrupt, but this may change in the future.
  • The GHC RTS currently can only recover from heap overflow if it detects that an explicit memory limit (set via RTS flags). has been exceeded. Currently, failure to allocate memory from the operating system results in immediate termination of the program.
The total size of the closure, in words.
Is the thing we will unfold into certainly cheap?
A cheap equality test which bales out fast! If it returns True the arguments are definitely equal, otherwise, they may or may not be equal.
Cheap expression equality test, can ignore ticks by type.
The heap size to set.
Convert an unpacked heap object, to a `GenClosure b`. The inputs to this function can be generated from a heap object using unpackClosure#.