Changes to Typeable

Roman Leshchinskiy rl at cse.unsw.edu.au
Tue Feb 14 09:00:37 CET 2012


On 13/02/2012, at 11:10, Simon Peyton-Jones wrote:

> |  Should there perhaps be a NewTypeable module which could then be renamed
> |  into Typeable once it is sufficiently well established?
> 
> I started with that idea, but there would be a 2-stage process:
> * Step 1: (when PolyTypable becomes available) People change to import Data.PolyTypeable
> * Step 2: (when PolyTypeable becomes Typeable) People change back to Data.Typeable

The problem is that libraries generally have to support multiple versions of GHC and this would become harder. But that isn't too bad, preprocessor magic solves it. It would be easier if we could define Typeable1 etc. as an alias for Typeable (since they now mean the same thing) but we don't have class aliases.

My main objection is still the fact that a central library will now rely on a highly experimental language feature which isn't even really available in a GHC release yet (my understanding is that support for polykinds in 7.4 is shaky at best). IMO, this should be avoided as a matter of policy. I realise that others are much less conservative than me in this respect, though.

Roman





More information about the Libraries mailing list