PROPOSAL: re-export 'Typeable' type-class from Prelude

Erik Hesselink hesselink at
Thu Sep 11 14:42:08 UTC 2014

On Thu, Sep 11, 2014 at 4:25 PM, Brandon Allbery <allbery.b at> wrote:
> On Thu, Sep 11, 2014 at 10:17 AM, Henning Thielemann
> <schlepptop at> wrote:
>> Am 11.09.2014 um 16:11 schrieb Felipe Lessa:
>>> On 11-09-2014 11:05, Michael Snoyman wrote:
>>>> The one case I think Typeable should *always* be around for is creating
>>>> new instances of Exception. The fact that AutoDeriveTypeable doesn't
>>>> require Typeable in Prelude lessens my +1 a bit down to a +0.5, but I
>>>> really want it to be easier for people to define their own exception
>>>> types.
>>> That's an argument for exporting Typeable from Control.Exception, since
>>> Prelude does not export Exception and friends.
>> For me the Typeable constraint of the Exception class is just an argument
>> to not use implicit exceptions of IO, but instead use one of the various
>> Exception monads with explicit exception types.
> Not to mention that "...want it to be easier for people to define their own
> exception types" really makes me think something's gone wrong with the
> design somewhere. Exceptions ought to be ... exceptional, not common enough
> that people regularly need to define their own.

I thought the whole point of extensible exceptions was to define your
own? That way you can catch them, instead of just piling them all
together. I get that there are people who think you shouldn't use
exceptions at all, but for the people who *do* use them, I think they
should almost always define a new type for each one.


More information about the Libraries mailing list