A type error of the form:
No instance for (UncaughtException MyException)
arising from a use of `g' at examples/docatch.hs:21:32-35
Possible fix:
add an instance declaration for (UncaughtException MyException)
In the expression: g ()
is the type checker saying:
"hey, you are trying to run a computation which throws a MyException without handling it, and I won't let you"
Either handle it or declare MyException as an UncaughtException.
The question: Is it possible to develop a GHC extension that attach (or prepend) such an explanation to the ghc error?
Or any other alternative that carry out the same functionality.
--
Alberto.
I created a ticket for the feature request:Ticket #7870Teachers, newbies and people working in Industry: Please push it!