h$ v / Safe-Inferred errorThe canonical Error type. It can be-created from a human-readable error message ()2more semantic context can be added to an existing Error ()pretty-printed ()errorCreate an ad-hoc  from an error message.errorCreate an error from a  type.If your type implements  , it is usually better to use  instead. Strings produced by  $ are usually not very user-friendly.Note: goes via  , so not efficient.errorCreate an error from an   type.The default implementation of   is  ,, so the same user-friendliness problems of  apply.Note: goes via  , so not efficient.error!Add a higher-level context to an .For example, your code hits a @file not found@ I/O exception. Instead of propagating it unseen, you catch it and annotate it with , and describe why you wanted to open the file in the first place: addContext "Trying to open config file" $ newError "file not found: ./foo" This way, when a user see the error, they will understand better what happened: 4"Trying to open config file: file not found: ./foo" See .errorPretty print the error.It will print all context messages, starting with the outermost.Example:.prettyError $ newError "file not found: ./foo""file not found: ./foo":{ prettyError- $ addContext "Trying to open config file"( $ newError "file not found: ./foo":}3"Trying to open config file: file not found: ./foo"error8Return the value from a potentially failing computation.Abort with the s message if it was a  .Panics : if ErrorExample:&unwrapError $ Left (newError "oh no!")*** Exception: oh no!...unwrapError $ Right 4242error8Return the value from a potentially failing computation.0Abort with the error message if it was an error.!The text message is added to the ' as additional context before aborting.Panics : if ErrorExample:?expectError "something bad happened" $ Left (newError "oh no!")-*** Exception: something bad happened: oh no!.../expectError "something bad happened" $ Right 4242      $error-0.1.1.0-KBXyPZpFlDECiR9WOu8ln0 Data.ErrorErrornewError showToErrorexceptionToError addContext prettyError unwrapError expectErrorbaseGHC.ShowShowGHC.Exception.Type ExceptionshowGHC.BaseStringdisplayException Data.EitherLeft