-- Copyright 2023 Lennart Augustsson-- See LICENSE file for full license.module Control.Error( error, _errorLoc, undefined, _undefinedLoc, errorWithoutStackTrace, ) whereimport qualified Prelude() -- do not import Preludeimport Data.Char_Typeimport Control.Exception.Internal-- mhs compiler adds location of call and rewrites to _errorLocerror :: forall a . String -> aerror = _errorLoc ""-- mhs compiler adds location of call and rewrites to _undefinedLocundefined :: forall a . aundefined = _undefinedLoc ""-- no location of call added_errorLoc :: forall a . String -> String -> a_errorLoc l s = throw (ErrorCallWithLocation s l)-- no location of call added_undefinedLoc :: forall a . String -> a_undefinedLoc l = throw (ErrorCallWithLocation "undefined" l)-- Error without locationerrorWithoutStackTrace :: forall a . String -> aerrorWithoutStackTrace = _errorLoc ""