Safe Haskell | None |
---|---|
Language | Haskell2010 |
Debug.NonInterleavedIO
Description
Functions for non-interleaved output
Intended for qualifed import.
import Debug.NonInterleavedIO qualified as NIIO
Alternatively, you can import Debug.NonInterleavedIO.Trace as a drop-in replacement for Debug.Trace.
The functions in this module can all be called concurrently, without resulting in interleaved output: each function call is atomic.
The first time any of these functions is called, we lookup the NIIO_OUTPUT
environment variable. If set, we will write to the file specified (if the
file already exists, it will be overwritten). If NIIO_OUTPUT
is not set, a
temporary file will be created in the system temporary directory; typically
such a file will be called tmpniionumber
. The name of this file is
written to stderr
(this is the only output origiating from functions in
this module that is not written to the file).
Synopsis
Output functions
Tracing functions
traceShowId :: Show a => a -> a Source #
Non-interleaved version of traceShowId
traceShowM :: (Applicative m, Show a) => a -> m () Source #
Non-interleaved version of traceShowM