summaryrefslogtreecommitdiff
path: root/libraries/base/Debug/Trace.hs-boot
blob: 9dbbe2dd37948d24ab7ae8ca65d05f5d77defb3d (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE UnboxedTuples #-}

-- This boot file is necessary to allow GHC developers to
-- use trace facilities in those (relatively few) modules that Debug.Trace
-- itself depends on. It is also necessary to make DsMonad.pprRuntimeTrace
-- trace injections work in those modules.

-----------------------------------------------------------------------------
-- |
-- Module      :  Debug.Trace
-- Copyright   :  (c) The University of Glasgow 2001
-- License     :  BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer  :  libraries@haskell.org
-- Stability   :  provisional
-- Portability :  portable
--
-- Functions for tracing and monitoring execution.
--
-- These can be useful for investigating bugs or performance problems.
-- They should /not/ be used in production code.
--
-----------------------------------------------------------------------------

module Debug.Trace (
        -- * Tracing
        -- $tracing
        trace,
        traceId,
        traceShow,
        traceShowId,
        traceStack,
        traceIO,
        traceM,
        traceShowM,

        -- * Eventlog tracing
        -- $eventlog_tracing
        traceEvent,
        traceEventIO,

        -- * Execution phase markers
        -- $markers
        traceMarker,
        traceMarkerIO,
  ) where

import GHC.Base
import GHC.Show

traceIO :: String -> IO ()

trace :: String -> a -> a

traceId :: String -> String

traceShow :: Show a => a -> b -> b

traceShowId :: Show a => a -> a

traceM :: Applicative f => String -> f ()

traceShowM :: (Show a, Applicative f) => a -> f ()

traceStack :: String -> a -> a

traceEvent :: String -> a -> a

traceEventIO :: String -> IO ()

traceMarker :: String -> a -> a

traceMarkerIO :: String -> IO ()