Text.XML.HXT.Arrow.XmlState.TraceHandling

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

Copyright | Copyright (C) 2010 Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt (uwe@fh-wedel.de)
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.XML.HXT.Arrow.XmlState.TraceHandling

Description

the trace arrows

Synopsis

- setTraceLevel :: Int -> IOStateArrow s b b
- getTraceLevel :: IOStateArrow s b Int
- setTraceCmd :: (Int -> String -> IO ()) -> IOStateArrow s b b
- getTraceCmd :: IOStateArrow a b (Int -> String -> IO ())
- withTraceLevel :: Int -> IOStateArrow s b c -> IOStateArrow s b c
- trace :: Int -> IOStateArrow s b String -> IOStateArrow s b b
- traceValue :: Int -> (b -> String) -> IOStateArrow s b b
- traceString :: Int -> (b -> String) -> IOStateArrow s b b
- traceMsg :: Int -> String -> IOStateArrow s b b
- traceSource :: IOStateArrow s XmlTree XmlTree
- traceTree :: IOStateArrow s XmlTree XmlTree
- traceDoc :: String -> IOStateArrow s XmlTree XmlTree
- traceOutputToStderr :: Int -> String -> IO ()

# Documentation

setTraceLevel :: Int -> IOStateArrow s b b #

set the global trace level

getTraceLevel :: IOStateArrow s b Int #

read the global trace level

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

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

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

acces the command for trace output

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

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 b #

apply a trace arrow and issue message to stderr

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

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 b #

an old alias for `traceValue`

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

issue a string message as trace

traceSource :: IOStateArrow s XmlTree XmlTree #

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

for better readability the source is formated with indentDoc

traceTree :: IOStateArrow s XmlTree XmlTree #

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

traceDoc :: String -> IOStateArrow s XmlTree XmlTree #

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

traceOutputToStderr :: Int -> String -> IO () #