blob: 78da3ab99a989dad8540abe49cd15a803c428b36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{-# LANGUAGE NoImplicitPrelude #-}
module GHC.Stack.CCS where
{- Cuts the following loop:
GHC.Exception.errorCallWithCallStackException requires
GHC.Stack.CCS.currentCallStack, which requires
Foreign.C (for peeking CostCentres)
GHC.Foreign, GHC.IO.Encoding (for decoding UTF-8 strings)
.. lots of stuff ...
GHC.Exception
-}
import GHC.Base
import GHC.Ptr
currentCallStack :: IO [String]
getCurrentCCS :: dummy -> IO (Ptr CostCentreStack)
ccsToStrings :: Ptr CostCentreStack -> IO [String]
renderStack :: [String] -> String
data CostCentreStack
|