Err package:base

The GHC.Err module defines the code for the wired-in error functions, which have a special type in the compiler (with "open tyvars"). We cannot define these functions in a module where they might be used (e.g., GHC.Base), because the magical wired-in type will get confused with what the typechecker figures out.
This is thrown when the user calls error. The String is the argument given to error. Historically, there was a second String for the location, but it was subsumed by the backtrace mechanisms (since base-4.22).
Deprecated: ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively.
C-specific Marshalling support: Handling of C "errno" error codes.
Haskell representation for errno values. The implementation is deliberately exposed, to allow users to add their own definitions of Errno values.
Routines for testing return values and raising a userError exception in case of values indicating an error state.
Standard IO Errors.
Throw an error when an illegal sequence is encountered
A description of a custom type error.
error stops execution and displays an error message.
A variant of error that does not produce a stack trace.
Construct an IOError based on the given Errno value. The optional information can be used to improve the accuracy of error messages.
Calls perror to indicate that there is a type error or similar in the given argument.
Calls perror to indicate an unknown format letter for a given type.
Calls perror to indicate that there is a missing argument in the argument list.
Calls perror to indicate that the format string ended early.
Deprecated: error appends the call stack now
The Haskell 2010 type for exceptions in the IO monad. Any I/O operation may raise an IOError instead of returning a result. For a more general type of exception, including also those that arise in pure code, see Exception. In Haskell 2010, this is an opaque type.
Raise an IOError in the IO monad.