Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module for recording and manipulating debug traces. For most users, the
TemplateHaskell
helpers in Debug should be sufficient.
Recording
Metadata about a function, used to drive the HTML view.
fun :: Show a => String -> (Call -> a) -> a Source #
Called under a lambda with a function name to provide a unique context for a particular call, e.g.:
tracedAdd x y = fun "add" $ \t -> var t "x" x + var t "y" y
This function involves giving identity to function calls, so is unsafe, and will only work under a lambda.
Viewing
debugClear :: IO () Source #
Clear all debug information. Useful when working in ghci
to reset
any previous debugging work and reduce the amount of output.
debugPrint :: IO () Source #
Print information about the observed function calls to stdout
,
in a human-readable format.
debugJSON :: IO String Source #
Obtain information about observed functions in JSON format. The JSON format is not considered a stable part of the interface, more presented as a back door to allow exploration of alternative views.
debugSave :: FilePath -> IO () Source #
Save information about observed functions to the specified file, in HTML format.