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


-- | A convenient way to panic.
--   
--   A convenient way to panic.
@package panic
@version 0.4.0.1

module Panic

-- | The exception thrown when panicing.
data Panic a
Panic :: a -> String -> [String] -> CallStack -> Panic a
[panicComponent] :: Panic a -> a
[panicLoc] :: Panic a -> String
[panicMsg] :: Panic a -> [String]
[panicStack] :: Panic a -> CallStack

-- | Description of a component.
class Typeable a => PanicComponent a

-- | Name of the panicing component.
panicComponentName :: PanicComponent a => a -> String

-- | Issue tracker for the panicking component.
panicComponentIssues :: PanicComponent a => a -> String

-- | Information about the component's revision. (commit hash, branch info)
panicComponentRevision :: PanicComponent a => a -> (String, String)

-- | An expression of type <tt>a -&gt; (String,String)</tt>. Uses template
--   Haskell to query Git for the current state of the repo. Note that the
--   state reported depends on when the module containing the splice was
--   compiled.
useGitRevision :: Q Exp

-- | Request a CallStack.
--   
--   NOTE: The implicit parameter <tt>?callStack :: CallStack</tt> is an
--   implementation detail and <b>should not</b> be considered part of the
--   <a>CallStack</a> API, we may decide to change the implementation in
--   the future.
type HasCallStack = ?callStack :: CallStack

-- | Throw an exception for the given component.
panic :: (PanicComponent a, HasCallStack) => a -> String -> [String] -> b
instance Panic.PanicComponent a => GHC.Internal.Exception.Type.Exception (Panic.Panic a)
instance Panic.PanicComponent a => GHC.Internal.Show.Show (Panic.Panic a)
