{-# LANGUAGE Trustworthy, TemplateHaskell #-}
module What4.Panic
  (HasCallStack, What4, Panic, panic) where

import Panic hiding (panic)
import qualified Panic

data What4 = What4

-- | `panic` represents an error condition that should only
--   arise due to a programming error. It will exit the program
--   and print a message asking users to open a ticket.
panic :: HasCallStack =>
  String {- ^ Short name of where the error occured -} ->
  [String] {- ^ More detailed description of the error  -} ->
  a
panic :: String -> [String] -> a
panic = What4 -> String -> [String] -> a
forall a b.
(PanicComponent a, HasCallStack) =>
a -> String -> [String] -> b
Panic.panic What4
What4

instance PanicComponent What4 where
  panicComponentName :: What4 -> String
panicComponentName What4
_ = String
"What4"
  panicComponentIssues :: What4 -> String
panicComponentIssues What4
_ = String
"https://github.com/GaloisInc/what4/issues"

  {-# Noinline panicComponentRevision #-}
  panicComponentRevision :: What4 -> (String, String)
panicComponentRevision = What4 -> (String, String)
$useGitRevision