displayException is never used
Summary
The typeclass method displayException
is not used. This should be remedied by either:
- Documenting that it does not get used anywhere (implies that there is no point in overriding the default)
- Using it (in
base
) when displaying exceptions.
Steps to reproduce
Here is an example that demonstrates that displayException
is not used:
import Control.Exception
main :: IO ()
main = throwIO MyException
data MyException = MyException
deriving (Show,Eq)
instance Exception MyException where
displayException _ = "custom-my-exception-display"
Running this results in:
$ ./example-exception
example-exception: MyException
Expected behavior
I would expect to see:
amartin@thadtop:~/Development/test$ ./example-exception
example-exception: custom-my-exception-display