module Feldspar.Compiler.Error where

data ErrorClass = InvariantViolation | InternalError | Warning
    deriving (Show, Eq)

handleError :: String -> ErrorClass -> String -> a
handleError place errorClass message = error $ "[" ++ show errorClass ++ " @ " ++ place ++ "]: " ++ message