GHC.Stack.CCS

GHC.Stack.CCS

Copyright (c) The University of Glasgow 2011
License see libraries/base/LICENSE
Maintainer cvs-ghc@haskell.org
Stability internal
Portability non-portable (GHC Extensions)
Safe Haskell Trustworthy
Language Haskell2010

Description

Access to GHC's call-stack simulation

Since: 4.5.0.0

Call stacks

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.

Since: 4.5.0.0

whoCreated :: a -> IO [String] Source

Get the stack trace attached to an object.

Since: 4.5.0.0

Internals

data CostCentreStack Source

data CostCentre Source

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

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

clearCCS :: IO a -> IO a 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

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.0.1/docs/html/libraries/base-4.9.0.0/GHC-Stack-CCS.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部