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 

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 #

Request a CallStack.

NOTE: The implicit parameter ?callStack :: CallStack is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.

Since: 4.9.0.0

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.