see Debug.FileLocation module for more definitions
- err :: String -> Q Exp
- undef :: Q Exp
- debug :: Show a => a -> a
- debugM :: (Monad m, Show a) => a -> m a
- debugMsg :: Show a => String -> 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
Documentation
like Prelude.error, but gives the file location
$(err "OH NO!) main:Main main.hs:4:10 OH NO!
like Prelude.undefined, but gives the file location use 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
debug :: Show a => a -> aSource
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 aSource
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 -> aSource
A version of Debug.Trace.trace that just prints a value and a message. This should be included in Debug.Trace
dbgMsg :: String -> Q ExpSource
TH version of Debug.Trace.trace that prints a value and a message prefix).
ltraceM :: (Monad m, Show a) => String -> a -> m aSource
monadic debug - like debug, but works as a standalone line in a monad TODO: TH version with error loaction info
strace :: Show a => a -> aSource
trace (print on stdout at runtime) a showable expression like debug, but does not print DEBUG: traceId is an alias for strace strace stands for show trace traceId means it returns itself after tracing like the id function
locationToString :: Loc -> StringSource