Safe Haskell | None |
---|---|
Language | Haskell98 |
see Debug.FileLocation module for more definitions
- err :: String -> Q Exp
- err' :: Q Exp
- undef :: Q Exp
- fromJst :: Q Exp
- fromRht :: Q Exp
- indx :: Q Exp
- indxShow :: Q Exp
- debug :: Show a => a -> a
- debugM :: (Monad m, Show a) => a -> m a
- debugMsg :: Show a => String -> a -> a
- debugMsgIf :: Show a => String -> (a -> Bool) -> a -> a
- dbg :: Q Exp
- dbgMsg :: String -> Q Exp
- trc :: String -> Q Exp
- ltrace :: Show a => String -> a -> a
- ltraceM :: (Monad m, Show a) => String -> a -> m a
- strace :: Show a => a -> a
- locationToString :: Loc -> String
- thrwIO :: Q Exp
- thrwsIO :: String -> Q Exp
- reThrow :: Q Exp
Documentation
err :: String -> Q Exp Source #
Like Prelude.error, but gives the file location.
$(err "OH NO!") main:Main main.hs:4:10 OH NO!
Like err
, but the error message (to be appended to the location) is an argument of the generated expression.
$(err) "OH NO!" main:Main main.hs:4:10 OH NO!
Like Prelude.undefined, but gives the file location.
Uses trace to output the location (this way we still use undefined instead of calling error).
$(undef) main:Main main.hs:4:10 undefined err: Prelude.undefined
Like (flip (
, but also shows the file location in case the element isn't found.!
)
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
debugMsgIf :: Show a => String -> (a -> Bool) -> a -> a Source #
A version of Debug.Trace.trace that just prints a value and a message. This should be included in Debug.Trace
dbgMsg :: String -> Q Exp Source #
TH version of Debug.Trace.trace that prints a value and a message prefix.
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".
locationToString :: Loc -> String Source #