monadloc-0.7.1: A class for monads which can keep a monadic call trace

Safe HaskellNone
LanguageHaskell98

Control.Monad.Loc.TH

Description

The TH macro withLocTH to manually annotate program points, but you should always use the preprocessor if possible.

Synopsis

Documentation

withLocTH :: Q Exp #

withLocTH is a convenient TH macro which expands to withLoc <source location> It should only be used when the MonadLoc preprocessor is not available. Usage:

f x = $withLocTH $ do
         $withLocTH $ something
         x < -$withLocTH $ something-else
         ...

NOTE: unfortunately type signatures are necessary when using withLocTH