base-4.6.0.1: Basic libraries

Portabilitynon-portable (GHC Extensions)
Stabilityinternal
Maintainercvs-ghc@haskell.org
Safe HaskellNone

GHC.Stack

Description

Access to GHC's call-stack simulation

Call stack

currentCallStack :: IO [String]Source

returns a '[String]' representing the current call stack. This can be useful for debugging.

The implementation uses the call-stack simulation maintined by the profiler, so it only works if the program was compiled with -prof and contains suitable SCC annotations (e.g. by using -fprof-auto). Otherwise, the list returned is likely to be empty or uninformative.

whoCreated :: a -> IO [String]Source

Internals

data CostCentreStack Source

data CostCentre Source

getCurrentCCS :: dummy -> IO (Ptr CostCentreStack)Source

getCCSOf :: a -> IO (Ptr CostCentreStack)Source

ccsCC :: Ptr CostCentreStack -> IO (Ptr CostCentre)Source

ccsParent :: Ptr CostCentreStack -> IO (Ptr CostCentreStack)Source

ccLabel :: Ptr CostCentre -> IO CString Source

ccModule :: Ptr CostCentre -> IO CString Source

ccSrcSpan :: Ptr CostCentre -> IO CString Source

ccsToStrings :: Ptr CostCentreStack -> IO [String]Source

renderStack :: [String] -> String Source

AltStyle によって変換されたページ (->オリジナル) /