Difference between errorCalls and userErrors

Hi! In module Control.Exception there are the exception predicates errorCalls and userErrors defined. Is there any difference between them? Which one? Thanks for any explanations, and maybe it should be documented in more detail? Kind regards, Andreas

Andreas-Haskell:
Hi!
In module Control.Exception there are the exception predicates errorCalls and userErrors defined. Is there any difference between them? Which one?
They match different kinds of exceptions, errorCalls (ErrorCall e) = Just e errorCalls _ = Nothing assertions (AssertionFailed e) = Just e assertions _ = Nothing dynExceptions (DynException e) = Just e dynExceptions _ = Nothing asyncExceptions (AsyncException e) = Just e asyncExceptions _ = Nothing userErrors (IOException e) | isUserError e = Just (ioeGetErrorString e) userErrors _ = Nothing The 'Awkward Squad' paper should have some details. The various papers on exceptions should also help (see the 'Research papers' page on the Haskell wiki). -- Don
participants (2)
-
Andreas Marth
-
dons@cse.unsw.edu.au