hxt-9.2.2: A collection of tools for processing XML with Haskell.

Portabilityportable
Stabilitystable
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Safe HaskellSafe-Infered

Text.XML.HXT.Arrow.XmlState.TraceHandling

Description

the trace arrows

Synopsis

Documentation

setTraceLevel :: Int -> IOStateArrow s b bSource

set the global trace level

getTraceLevel :: IOStateArrow s b IntSource

read the global trace level

setTraceCmd :: (Int -> String -> IO ()) -> IOStateArrow s b bSource

set the global trace command. This command does the trace output

getTraceCmd :: IOStateArrow a b (Int -> String -> IO ())Source

acces the command for trace output

withTraceLevel :: Int -> IOStateArrow s b c -> IOStateArrow s b cSource

run an arrow with a given trace level, the old trace level is restored after the arrow execution

trace :: Int -> IOStateArrow s b String -> IOStateArrow s b bSource

apply a trace arrow and issue message to stderr

traceValue :: Int -> (b -> String) -> IOStateArrow s b bSource

trace the current value transfered in a sequence of arrows.

The value is formated by a string conversion function. This is a substitute for the old and less general traceString function

traceString :: Int -> (b -> String) -> IOStateArrow s b bSource

an old alias for traceValue

traceMsg :: Int -> String -> IOStateArrow s b bSource

issue a string message as trace

traceSource :: IOStateArrow s XmlTree XmlTreeSource

issue the source representation of a document if trace level >= 3

for better readability the source is formated with indentDoc

traceTree :: IOStateArrow s XmlTree XmlTreeSource

issue the tree representation of a document if trace level >= 4

traceDoc :: String -> IOStateArrow s XmlTree XmlTreeSource

trace a main computation step issue a message when trace level >= 1, issue document source if level >= 3, issue tree when level is >= 4