file-location-0.4.9.1: common functions that show file location information

Safe HaskellNone
LanguageHaskell98

Debug.FileLocation

Description

functions that help you with debugging. Most would make sense in the Debug.Trace module There are Template Haskell versions that show you file locaiton information

Synopsis

Documentation

debug :: Show a => a -> a Source #

A version of Debug.Trace.trace that just prints a value. This should be included in Debug.Trace

debugM :: (Monad m, Show a) => a -> m a Source #

Monadic debug - like debug, but works as a standalone line in a monad.

TODO: TH version with error loaction info

debugMsg :: Show a => String -> a -> a Source #

A version of Debug.Trace.trace that just prints a value and a message. This should be included in Debug.Trace

dbg :: Q Exp Source #

TH version of Debug.Trace.trace that just prints a value.

dbgMsg :: String -> Q Exp Source #

TH version of Debug.Trace.trace that prints a value and a message prefix.

trc :: String -> Q Exp Source #

A TH version of Debug.Trace.trace that prints location information

ltrace :: Show a => String -> a -> a Source #

Labelled trace - like strace, but with a label prepended.

ltraceM :: (Monad m, Show a) => String -> a -> m a Source #

Monadic debug - like debug, but works as a standalone line in a monad.

TODO: TH version with error loaction info

strace :: Show a => a -> a Source #

Trace (print on stderr at runtime) a showable expression like debug, but do not print "DEBUG: ".

"strace" stands for "show trace".

traceId :: Show a => a -> a Source #

__LOC__ :: Q Exp Source #

Embed an expression of type Loc containing the location information for the place where it appears. Could be used in custom Exception types and similar:

throw $ MyException $__LOC__