PROPOSAL: Add displayException to Exception typeclass

Roman Cheplyaka roma at ro-che.info
Mon Nov 10 16:19:44 UTC 2014


On 10/11/14 11:08, Andreas Abel wrote:
> How about a compromise:
> 
> 1.  Add a new method to the Exception typeclass:
> 
>     -- | Render this exception value in a human-friendly manner. Default
> implementation: @show at .
>     displayException :: e -> String
>     displayException = show
> 
> 2.  Add a function that can be invoked to change the default handler.
> 
> Then one can easily install a generic handler that uses displayException.

Agreed.

Roman



More information about the Libraries mailing list