-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | common functions that show file location information
--   
--   Common debugging/error/exception functions that give file location
--   information
--   
--   <pre>
--   $(err "OH NO!")
--   main:Main main.hs:16:1 OH NO!
--   </pre>
--   
--   Notice how it displays package:module file:line:character
--   
--   It exposes the functions err (error), undef (undefined), and trc
--   (Debug.Trace.trace). All of these behave the same as their normal
--   counterpart but also spit out a location.
--   
--   Here is my favorite helper, debug, which is like trace but just show
--   the value.
--   
--   <pre>
--   debug [1,2,3]
--   DEBUG: [1,2,3]
--   [1,2,3]
--   </pre>
--   
--   And The Template Haskell version.
--   
--   <pre>
--   $(dbg) [1,2,3]
--   DEBUG main:Main main.hs:1:3 [1,2,3]
--   [1,2,3]
--   </pre>
--   
--   Also there is a version of thrwIO that gives location information
--   
--   <pre>
--   ($(thrwIO) $ AException) <a>catch</a> e -&gt; putStrLn ("Caught " ++ show (e :: AException))
--   Caught AException "main:Main test/main.hs:25:6"
--   </pre>
--   
--   See module for a listing of all the functions with short descriptions,
--   and the homepage for some more examples
--   https:<i></i>github.com<i>gregwebs</i>ErrorLocation.hs
@package file-location
@version 0.4.5.1


-- | Functions that help you with debugging. Most would make sense in the
--   Debug.Trace module.
module Debug.Util

-- | A version of Debug.Trace.trace that just prints a value. This should
--   be included in Debug.Trace
debug :: Show a => a -> a

-- | Monadic debug - like debug, but works as a standalone line in a monad.
--   
--   TODO: TH version with error loaction info
debugM :: (Monad m, Show a) => a -> m a

-- | A version of Debug.Trace.trace that just prints a value and a message.
--   This should be included in Debug.Trace
debugMsg :: Show a => String -> a -> a

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

-- | Labelled trace - like <a>strace</a>, but with a label prepended.
ltrace :: Show a => String -> a -> a

-- | Monadic debug - like debug, but works as a standalone line in a monad.
--   
--   TODO: TH version with error loaction info
ltraceM :: (Monad m, Show a) => String -> a -> m a

-- | Trace (print on stderr at runtime) a showable expression like
--   <a>debug</a>, but do not print "DEBUG: ".
--   
--   "strace" stands for "show trace".
strace :: Show a => a -> a
traceId :: Show a => a -> a

module FileLocation.LocationString
locationToString :: Loc -> String


-- | 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
module Debug.FileLocation

-- | A version of Debug.Trace.trace that just prints a value. This should
--   be included in Debug.Trace
debug :: Show a => a -> a

-- | Monadic debug - like debug, but works as a standalone line in a monad.
--   
--   TODO: TH version with error loaction info
debugM :: (Monad m, Show a) => a -> m a

-- | A version of Debug.Trace.trace that just prints a value and a message.
--   This should be included in Debug.Trace
debugMsg :: Show a => String -> a -> a

-- | TH version of Debug.Trace.trace that just prints a value.
dbg :: Q Exp

-- | TH version of Debug.Trace.trace that prints a value and a message
--   prefix.
dbgMsg :: String -> Q Exp

-- | A TH version of Debug.Trace.trace that prints location information
trc :: String -> Q Exp

-- | Labelled trace - like <a>strace</a>, but with a label prepended.
ltrace :: Show a => String -> a -> a

-- | Monadic debug - like debug, but works as a standalone line in a monad.
--   
--   TODO: TH version with error loaction info
ltraceM :: (Monad m, Show a) => String -> a -> m a

-- | Trace (print on stderr at runtime) a showable expression like
--   <a>debug</a>, but do not print "DEBUG: ".
--   
--   "strace" stands for "show trace".
strace :: Show a => a -> a
traceId :: Show a => a -> a

module Control.Exception.FileLocation
thrwIO :: Q Exp
thrwsIO :: String -> Q Exp
reThrow :: Q Exp
instance Typeable ReThrownException
instance Exception ReThrownException
instance Show ReThrownException


-- | see Debug.FileLocation module for more definitions
module FileLocation

-- | Like Prelude.error, but gives the file location.
--   
--   <pre>
--   $(err "OH NO!")
--   main:Main main.hs:4:10 OH NO!
--   </pre>
err :: String -> Q Exp

-- | Like <a>err</a>, but the error message (to be appended to the
--   location) is an argument of the generated expression.
--   
--   <pre>
--   $(err) "OH NO!"
--   main:Main main.hs:4:10 OH NO!
--   </pre>
err' :: Q Exp

-- | Like Prelude.undefined, but gives the file location.
--   
--   Uses trace to output the location (this way we still use undefined
--   instead of calling error).
--   
--   <pre>
--   $(undef)
--   main:Main main.hs:4:10 undefined
--   err: Prelude.undefined
--   </pre>
undef :: Q Exp

-- | Like <tt>fromJust</tt>, but also shows the file location.
fromJst :: Q Exp

-- | Like <tt>fromRight</tt>, but also show the file location.
fromRht :: Q Exp

-- | Like <tt>(flip (<a>!</a>)</tt>, but also shows the file location in
--   case the element isn't found.
indx :: Q Exp

-- | Like <a>indx</a>, but also <a>show</a>s the looked-up element in case
--   it isn't found.
indxShow :: Q Exp

-- | A version of Debug.Trace.trace that just prints a value. This should
--   be included in Debug.Trace
debug :: Show a => a -> a

-- | Monadic debug - like debug, but works as a standalone line in a monad.
--   
--   TODO: TH version with error loaction info
debugM :: (Monad m, Show a) => a -> m a

-- | A version of Debug.Trace.trace that just prints a value and a message.
--   This should be included in Debug.Trace
debugMsg :: Show a => String -> a -> a

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

-- | TH version of Debug.Trace.trace that just prints a value.
dbg :: Q Exp

-- | TH version of Debug.Trace.trace that prints a value and a message
--   prefix.
dbgMsg :: String -> Q Exp

-- | A TH version of Debug.Trace.trace that prints location information
trc :: String -> Q Exp

-- | Labelled trace - like <a>strace</a>, but with a label prepended.
ltrace :: Show a => String -> a -> a

-- | Monadic debug - like debug, but works as a standalone line in a monad.
--   
--   TODO: TH version with error loaction info
ltraceM :: (Monad m, Show a) => String -> a -> m a

-- | Trace (print on stderr at runtime) a showable expression like
--   <a>debug</a>, but do not print "DEBUG: ".
--   
--   "strace" stands for "show trace".
strace :: Show a => a -> a
locationToString :: Loc -> String
thrwIO :: Q Exp
thrwsIO :: String -> Q Exp
reThrow :: Q Exp
