{-# LANGUAGE CPP #-}
{-# LANGUAGE ImplicitParams #-}
module Language.PureScript.Crash where
import Prelude.Compat
import qualified GHC.Stack
#if __GLASGOW_HASKELL__ >= 800
type HasCallStack = GHC.Stack.HasCallStack
#elif MIN_VERSION_GLASGOW_HASKELL(7,10,2,0)
type HasCallStack = (?callStack :: GHC.Stack.CallStack)
#else
import GHC.Exts (Constraint)
type HasCallStack = (() :: Constraint)
#endif
internalError :: HasCallStack => String -> a
internalError =
error
. ("An internal error occurred during compilation: " ++)
. (++ "\nPlease report this at https://github.com/purescript/purescript/issues")
. show