ghc-heap-view-0.5.4: 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

Whethter to GC in every step

-> Box

The closure to investigate

-> IO () 

This functions 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