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

A flat encoding of debugging observations.

Constructors

DebugTrace 

Fields

data Function Source #

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

Constructors

Function 

Fields

Instances

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

Associated Types

type Rep Function :: * -> * #

Methods

from :: Function -> Rep Function x #

to :: Rep Function x -> Function #

Hashable Function Source # 

Methods

hashWithSalt :: Int -> Function -> Int #

hash :: Function -> Int #

ToJSON Function Source # 
FromJSON Function Source # 
NFData Function Source # 

Methods

rnf :: Function -> () #

type Rep Function Source # 

data CallData Source #

A flat encoding of an observed call.

Constructors

CallData 

Fields

Viewing the trace

debugPrintTrace :: DebugTrace -> IO () Source #

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

debugJSONTrace :: DebugTrace -> ByteString 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.

debugViewTrace :: DebugTrace -> IO () Source #

Open a web browser showing information about observed functions.

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

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

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

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

Orphan instances

Show a Source #

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 #