HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-internal-9.1003.0Haskell2010

GHC.Internal.ExecutionStack

This is a module for efficient stack traces. This stack trace implementation is considered low overhead. Basic usage looks like this:

import GHC.Internal.ExecutionStack

myFunction :: IO ()
myFunction = do
     putStrLn =<< showStackTrace

Your GHC must have been built with libdw support for this to work.

user@host:~$ ghc --info | grep libdw
 ,("RTS expects libdw",YES)
  • 2 types
  • 2 values
valuegetStackTrace :: IO (Maybe [Location])
#

Get a trace of the current execution stack state.

Returns Nothing if stack trace support isn't available on host machine.