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


-- | TH splices to augment log messages with file info
--   
--   TH splices to augment log messages with file info.
@package logging-effect-extra-file
@version 1.1.2

module Control.Monad.Log.Extra.File

-- | Generates a function that logs an <a>Emergency</a> message with info
--   from the source file.
--   
--   <pre>
--   $(logEmergencyTH) "GAH! All systems are down!!!"
--   </pre>
logEmergencyTH :: Q Exp

-- | Generates a function that logs an <a>Alert</a> message with info from
--   the source file.
--   
--   <pre>
--   $(logAlertTH) "Red alert!"
--   </pre>
logAlertTH :: Q Exp

-- | Generates a function that logs a <a>Critical</a> message with info
--   from the source file.
--   
--   <pre>
--   $(logCriticalTH) "Critical hit!"
--   </pre>
logCriticalTH :: Q Exp

-- | Generates a function that logs an <a>Error</a> message with info from
--   the source file.
--   
--   <pre>
--   $(logErrorTH) "Errors abound!"
--   </pre>
logErrorTH :: Q Exp

-- | Generates a function that logs a <a>Warning</a> message with info from
--   the source file.
--   
--   <pre>
--   $(logWarningTH) "Cargo number 2331 has commandeered the vessel"
--   </pre>
logWarningTH :: Q Exp

-- | Generates a function that logs a <a>Notice</a> message with info from
--   the source file.
--   
--   <pre>
--   $(logNoticeTH) "Heads up, but it's no biggie."
--   </pre>
logNoticeTH :: Q Exp

-- | Generates a function that logs an <a>Informational</a> message with
--   info from the source file.
--   
--   <pre>
--   $(logInfoTH) "Does anyone read these?"
--   </pre>
logInfoTH :: Q Exp

-- | Generates a function that logs an <a>Informational</a> message with
--   info from the source file.
--   
--   <pre>
--   $(logInformationalTH) "Does anyone read these?"
--   </pre>

-- | <i>Deprecated: logInformationalTH is deprecated in favor of
--   logInfoTH.</i>
logInformationalTH :: Q Exp

-- | Generates a function that logs a <a>Debug</a> message with info from
--   the source file.
--   
--   <pre>
--   $(logDebugTH) "Sleuthing with log messages..."
--   </pre>
logDebugTH :: Q Exp

-- | Generates a function that logs a message with info from the source
--   file.
--   
--   <pre>
--   $(logMessageTH) "Burn after reading."
--   </pre>
logMessageTH :: Q Exp

-- | Add "File" information to a log message.
data WithFile a
WithFile :: Loc -> a -> WithFile a

-- | Retrieve the file location info.
[msgLoc] :: WithFile a -> Loc

-- | View the underlying message.
[discardFile] :: WithFile a -> a

-- | Given a way to render the underlying message <tt>a</tt>, render a
--   message with its file info.
--   
--   <pre>
--   &gt;&gt;&gt; let loc = Loc "SomeFile.hs" "some-package" "SomeModule" (1, 1) (1, 1)
--   
--   &gt;&gt;&gt; renderWithFile id (WithFile loc "Some message")
--   [SomeModule:1] Some message
--   </pre>
renderWithFile :: (a -> Doc) -> (WithFile a -> Doc)

-- | Generates a function that logs a message with the given
--   <a>Severity</a> and info from the source file.
logSeverityMessageTH :: Severity -> Q Exp

-- | Lift a location into an <a>Exp</a>.
liftLoc :: Loc -> Q Exp
data Loc :: *
Loc :: String -> String -> String -> CharPos -> CharPos -> Loc
[loc_filename] :: Loc -> String
[loc_package] :: Loc -> String
[loc_module] :: Loc -> String
[loc_start] :: Loc -> CharPos
[loc_end] :: Loc -> CharPos
instance Data.Foldable.Foldable Control.Monad.Log.Extra.File.WithFile
instance Data.Traversable.Traversable Control.Monad.Log.Extra.File.WithFile
instance GHC.Base.Functor Control.Monad.Log.Extra.File.WithFile
instance GHC.Show.Show a => GHC.Show.Show (Control.Monad.Log.Extra.File.WithFile a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Control.Monad.Log.Extra.File.WithFile a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Control.Monad.Log.Extra.File.WithFile a)
instance Language.Haskell.TH.Syntax.Lift Control.Monad.Log.Severity
