panic-0.4.0.1: A convenient way to panic.
Safe HaskellTrustworthy
LanguageHaskell2010

Panic

Synopsis

Documentation

data Panic a Source #

The exception thrown when panicing.

Constructors

Panic 

Fields

Instances

Instances details
PanicComponent a => Exception (Panic a) Source # 
Instance details

Defined in Panic

Methods

toException :: Panic a -> SomeException

fromException :: SomeException -> Maybe (Panic a)

displayException :: Panic a -> String

PanicComponent a => Show (Panic a) Source # 
Instance details

Defined in Panic

Methods

showsPrec :: Int -> Panic a -> ShowS

show :: Panic a -> String

showList :: [Panic a] -> ShowS

class Typeable a => PanicComponent a where Source #

Description of a component.

Methods

panicComponentName :: a -> String Source #

Name of the panicing component.

panicComponentIssues :: a -> String Source #

Issue tracker for the panicking component.

panicComponentRevision :: a -> (String, String) Source #

Information about the component's revision. (commit hash, branch info)

useGitRevision :: Q Exp Source #

An expression of type a -> (String,String). 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.

type HasCallStack = ?callStack :: CallStack #

panic Source #

Arguments

:: (PanicComponent a, HasCallStack) 
=> a

Component identification

-> String

Location of problem

-> [String]

Problem description (lines)

-> b 

Throw an exception for the given component.