debug-0.1.1: Simple trace-based debugger

Safe HaskellNone
LanguageHaskell2010

Debug.DebugTrace

Contents

Description

Module for recording and manipulating debug traces. For most users, the TemplateHaskell helpers in Debug should be sufficient.

Synopsis

Debug traces

data DebugTrace #

A flat encoding of debugging observations.

Constructors

DebugTrace 

Fields

data Function #

Metadata about a function, used to drive the HTML view.

Constructors

Function 

Fields

Instances

Eq Function # 
Ord Function # 
Show Function # 
Generic Function # 

Associated Types

type Rep Function :: * -> * #

Methods

from :: Function -> Rep Function x #

to :: Rep Function x -> Function #

Hashable Function # 

Methods

hashWithSalt :: Int -> Function -> Int #

hash :: Function -> Int #

ToJSON Function # 
FromJSON Function # 
NFData Function # 

Methods

rnf :: Function -> () #

type Rep Function # 

data CallData #

A flat encoding of an observed call.

Constructors

CallData 

Fields

Viewing the trace

debugPrintTrace :: DebugTrace -> IO () #

Print information about the observed function calls to stdout, in a human-readable format.

debugJSONTrace :: DebugTrace -> ByteString #

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.

debugViewTrace :: DebugTrace -> IO () #

Open a web browser showing information about observed functions.

debugSaveTrace :: FilePath -> DebugTrace -> IO () #

Save information about observed functions to the specified file, in HTML format.

getTraceVars :: DebugTrace -> [(Function, [(Text, Text)])] #

Along with the function metatdata, get a list of the variable names and string values from the trace

Orphan instances

Show a #

An orphan instance of Show that maps anything without a Show instance to ?. Suitable for use only when debugging.

Methods

showsPrec :: Int -> a -> ShowS #

show :: a -> String #

showList :: [a] -> ShowS #