/usr/share/doc/libghc-text-show-doc/html/TextShow-Debug-Trace.html is in libghc-text-show-doc 2.1.1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>TextShow.Debug.Trace</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_TextShow-Debug-Trace.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/TextShow-Debug-Trace.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">text-show-2.1.1: Efficient conversion of values into Text</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(C) 2014-2015 Ryan Scott</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>Ryan Scott</td></tr><tr><th>Stability</th><td>Provisional</td></tr><tr><th>Portability</th><td>GHC</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">TextShow.Debug.Trace</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Tracing</a></li><li><a href="#g:2">Eventlog tracing</a></li><li><a href="#g:3">Execution phase markers</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Functions for tracing and monitoring execution.</p><p>These can be useful for investigating bugs or performance problems.
They should <em>not</em> be used in production code.</p><p>If you do not wish to require <code><a href="TextShow.html#t:TextShow">TextShow</a></code> instances for your <code>trace</code> functions,
the <a href="TextShow-Debug-Trace-TH.html">TextShow.Debug.Trace.TH</a> and <a href="Text-Show-Text-Debug-Trace-Generic.html">Text.Show.Text.Debug.Trace.Generic</a> modules
exist to convert the input to a debug message using Template Haskell or generics,
respectively.</p><p><em>Since: 2</em></p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:tracet">tracet</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetl">tracetl</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetId">tracetId</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:tracetlId">tracetlId</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></li><li class="src short"><a href="#v:traceTextShow">traceTextShow</a> :: <a href="TextShow.html#t:TextShow">TextShow</a> a => a -> b -> b</li><li class="src short"><a href="#v:traceTextShowId">traceTextShowId</a> :: <a href="TextShow.html#t:TextShow">TextShow</a> a => a -> a</li><li class="src short"><a href="#v:tracetStack">tracetStack</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetlStack">tracetlStack</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetIO">tracetIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tracetlIO">tracetlIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tracetM">tracetM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> f ()</li><li class="src short"><a href="#v:tracetlM">tracetlM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> f ()</li><li class="src short"><a href="#v:traceTextShowM">traceTextShowM</a> :: (<a href="TextShow.html#t:TextShow">TextShow</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f) => a -> f ()</li><li class="src short"><a href="#v:tracetEvent">tracetEvent</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetlEvent">tracetlEvent</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetEventIO">tracetEventIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tracetlEventIO">tracetlEventIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tracetMarker">tracetMarker</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetlMarker">tracetlMarker</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a</li><li class="src short"><a href="#v:tracetMarkerIO">tracetMarkerIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:tracetlMarkerIO">tracetlMarkerIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1 id="g:1">Tracing</h1><div class="doc"><p>The <code>tracet(l)</code>, <code>traceTextShow</code> and <code>tracet(l)IO</code> functions print messages to an
output stream. They are intended for "printf debugging", that is: tracing the flow
of execution and printing interesting values.</p><p>All these functions evaluate the message completely before printing
it; so if the message is not fully defined, none of it will be
printed.</p><p>The usual output stream is <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#v:stderr">stderr</a></code>. For Windows GUI applications
(that have no stderr) the output is directed to the Windows debug console.
Some implementations of these functions may decorate the <code>Text</code> that's
output to indicate that you're tracing.</p></div><div class="top"><p class="src"><a name="v:tracet" class="def">tracet</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracet" class="link">Source</a></p><div class="doc"><p>The <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> function outputs the trace message given as its first argument,
before returning the second argument as its result.</p><p>For example, this returns the value of <code>f x</code> but first outputs the message.</p><pre>tracet ("calling f with x = " <> showt x) (f x)</pre><p>The <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> function should <em>only</em> be used for debugging, or for monitoring
execution. The function is not referentially transparent: its type indicates
that it is a pure function but it has the side effect of outputting the
trace message.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetl" class="def">tracetl</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetl" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetId" class="def">tracetId</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/TextShow-Debug-Trace.html#tracetId" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> but returns the message instead of a third value.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlId" class="def">tracetlId</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> <a href="src/TextShow-Debug-Trace.html#tracetlId" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetId">tracetId</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:traceTextShow" class="def">traceTextShow</a> :: <a href="TextShow.html#t:TextShow">TextShow</a> a => a -> b -> b <a href="src/TextShow-Debug-Trace.html#traceTextShow" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code>, but uses <code><a href="TextShow.html#v:showt">showt</a></code> on the argument to convert it to a <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code>.</p><p>This makes it convenient for printing the values of interesting variables or
expressions inside a function. For example here we print the value of the
variables <code>x</code> and <code>z</code>:</p><pre>f x y =
traceTextShow (x, z) $ result
where
z = ...
...</pre><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:traceTextShowId" class="def">traceTextShowId</a> :: <a href="TextShow.html#t:TextShow">TextShow</a> a => a -> a <a href="src/TextShow-Debug-Trace.html#traceTextShowId" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:traceTextShow">traceTextShow</a></code> but returns the shown value instead of a third value.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetStack" class="def">tracetStack</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetStack" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> but additionally prints a call stack if one is
available.</p><p>In the current GHC implementation, the call stack is only
availble if the program was compiled with <code>-prof</code>; otherwise
<code><a href="TextShow-Debug-Trace.html#v:tracetStack">tracetStack</a></code> behaves exactly like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code>. Entries in the call
stack correspond to <code>SCC</code> annotations, so it is a good idea to use
<code>-fprof-auto</code> or <code>-fprof-auto-calls</code> to add SCC annotations automatically.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlStack" class="def">tracetlStack</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetlStack" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetStack">tracetStack</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetIO" class="def">tracetIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/TextShow-Debug-Trace.html#tracetIO" class="link">Source</a></p><div class="doc"><p>The <code><a href="TextShow-Debug-Trace.html#v:tracetIO">tracetIO</a></code> function outputs the trace message from the IO monad.
This sequences the output with respect to other IO actions.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlIO" class="def">tracetlIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/TextShow-Debug-Trace.html#tracetlIO" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetIO">tracetIO</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetM" class="def">tracetM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> f () <a href="src/TextShow-Debug-Trace.html#tracetM" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> but returning unit in an arbitrary <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a></code> context. Allows for
convenient use in do-notation. Note that the application of <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> is not an action
in the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a></code> context, as <code><a href="TextShow-Debug-Trace.html#v:tracetIO">tracetIO</a></code> is in the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a></code> type.</p><pre>... = do
x <- ...
tracetM $ "x: " <> showt x
y <- ...
tracetM $ "y: " <> showt y</pre><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlM" class="def">tracetlM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> f () <a href="src/TextShow-Debug-Trace.html#tracetlM" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetM">tracetM</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p></div></div><div class="top"><p class="src"><a name="v:traceTextShowM" class="def">traceTextShowM</a> :: (<a href="TextShow.html#t:TextShow">TextShow</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> f) => a -> f () <a href="src/TextShow-Debug-Trace.html#traceTextShowM" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetM">tracetM</a></code>, but uses <code><a href="TextShow.html#v:showt">showt</a></code> on the argument to convert it to a <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code>.</p><pre>... = do
x <- ...
traceTextShowM x
y <- ...
traceTextShowM $ x + y</pre><p><em>Since: 2</em></p></div></div><h1 id="g:2">Eventlog tracing</h1><div class="doc"><p>Eventlog tracing is a performance profiling system. These functions emit
extra events into the eventlog. In combination with eventlog profiling
tools these functions can be used for monitoring execution and
investigating performance problems.</p><p>Currently only GHC provides eventlog profiling, see the GHC user guide for
details on how to use it. These function exists for other Haskell
implementations but no events are emitted. Note that the <code>Text</code> message is
always evaluated, whether or not profiling is available or enabled.</p></div><div class="top"><p class="src"><a name="v:tracetEvent" class="def">tracetEvent</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetEvent" class="link">Source</a></p><div class="doc"><p>The <code><a href="TextShow-Debug-Trace.html#v:tracetEvent">tracetEvent</a></code> function behaves like <code><a href="TextShow-Debug-Trace.html#v:tracet">tracet</a></code> with the difference that
the message is emitted to the eventlog, if eventlog profiling is available
and enabled at runtime.</p><p>It is suitable for use in pure code. In an IO context use <code><a href="TextShow-Debug-Trace.html#v:tracetEventIO">tracetEventIO</a></code>
instead.</p><p>Note that when using GHC's SMP runtime, it is possible (but rare) to get
duplicate events emitted if two CPUs simultaneously evaluate the same thunk
that uses <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Debug-Trace.html#v:traceEvent">traceEvent</a></code>.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlEvent" class="def">tracetlEvent</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetlEvent" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetEvent">tracetEvent</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetEventIO" class="def">tracetEventIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/TextShow-Debug-Trace.html#tracetEventIO" class="link">Source</a></p><div class="doc"><p>The <code><a href="TextShow-Debug-Trace.html#v:tracetEventIO">tracetEventIO</a></code> function emits a message to the eventlog, if eventlog
profiling is available and enabled at runtime.</p><p>Compared to <code><a href="TextShow-Debug-Trace.html#v:tracetEvent">tracetEvent</a></code>, <code><a href="TextShow-Debug-Trace.html#v:tracetEventIO">tracetEventIO</a></code> sequences the event with respect to
other IO actions.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlEventIO" class="def">tracetlEventIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/TextShow-Debug-Trace.html#tracetlEventIO" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetEventIO">tracetEventIO</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><h1 id="g:3">Execution phase markers</h1><div class="doc"><p>When looking at a profile for the execution of a program we often want to
be able to mark certain points or phases in the execution and see that
visually in the profile.</p></div><div class="top"><p class="src"><a name="v:tracetMarker" class="def">tracetMarker</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetMarker" class="link">Source</a></p><div class="doc"><p>The <code><a href="TextShow-Debug-Trace.html#v:tracetMarker">tracetMarker</a></code> function emits a marker to the eventlog, if eventlog
profiling is available and enabled at runtime. The <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> is the name of
the marker. The name is just used in the profiling tools to help you keep
clear which marker is which.</p><p>This function is suitable for use in pure code. In an IO context use
<code><a href="TextShow-Debug-Trace.html#v:tracetMarkerIO">tracetMarkerIO</a></code> instead.</p><p>Note that when using GHC's SMP runtime, it is possible (but rare) to get
duplicate events emitted if two CPUs simultaneously evaluate the same thunk
that uses <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Debug-Trace.html#v:traceMarker">traceMarker</a></code>.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlMarker" class="def">tracetlMarker</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> a -> a <a href="src/TextShow-Debug-Trace.html#tracetlMarker" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetMarker">tracetMarker</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetMarkerIO" class="def">tracetMarkerIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/TextShow-Debug-Trace.html#tracetMarkerIO" class="link">Source</a></p><div class="doc"><p>The <code><a href="TextShow-Debug-Trace.html#v:tracetMarkerIO">tracetMarkerIO</a></code> function emits a marker to the eventlog, if eventlog
profiling is available and enabled at runtime.</p><p>Compared to <code><a href="TextShow-Debug-Trace.html#v:tracetMarker">tracetMarker</a></code>, <code><a href="TextShow-Debug-Trace.html#v:tracetMarkerIO">tracetMarkerIO</a></code> sequences the event with respect to
other IO actions.</p><p><em>Since: 2</em></p></div></div><div class="top"><p class="src"><a name="v:tracetlMarkerIO" class="def">tracetlMarkerIO</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/TextShow-Debug-Trace.html#tracetlMarkerIO" class="link">Source</a></p><div class="doc"><p>Like <code><a href="TextShow-Debug-Trace.html#v:tracetMarkerIO">tracetMarkerIO</a></code> but accepts a lazy <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></code> argument.</p><p><em>Since: 2</em></p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|