ghc-heap-view-0.6.0: Extract the heap representation of Haskell values and thunks

Safe HaskellNone
LanguageHaskell2010

GHC.HeapView.Debug

Description

Utilities to debug GHC.HeapView.

Synopsis

Documentation

walkHeap Source #

Arguments

:: Bool

Whether to check for cycles

-> Bool

Whether to GC in every step

-> Box

The closure to investigate

-> IO () 

This function walks the heap referenced by the argument, printing the "path", i.e. the pointer indices from the initial to the current closure and the closure itself. When the runtime crashes, the problem is likely related to one of the earlier steps.

walkPrefix :: [Int] -> a -> IO Box Source #

findM :: (a -> IO Bool) -> [a] -> IO (Maybe a) Source #

isCons :: GenClosure b -> Maybe (b, b) Source #