{-# LANGUAGE Safe #-}
module Copilot.Language.Error
( impossible
, badUsage ) where
impossible :: String
-> String
-> a
impossible :: forall a. String -> String -> a
impossible String
function String
package =
forall a. HasCallStack => String -> a
error forall a b. (a -> b) -> a -> b
$ String
"Impossible error in function "
forall a. [a] -> [a] -> [a]
++ String
function forall a. [a] -> [a] -> [a]
++ String
", in package " forall a. [a] -> [a] -> [a]
++ String
package
forall a. [a] -> [a] -> [a]
++ String
". Please file an issue at "
forall a. [a] -> [a] -> [a]
++ String
"https://github.com/Copilot-Language/copilot/issues"
forall a. [a] -> [a] -> [a]
++ String
"or email the maintainers at <ivan.perezdominguez@nasa.gov>"
badUsage :: String
-> a
badUsage :: forall a. String -> a
badUsage String
msg = forall a. HasCallStack => String -> a
error forall a b. (a -> b) -> a -> b
$ String
"Copilot error: " forall a. [a] -> [a] -> [a]
++ String
msg