Changes between Version 12 and Version 13 of Status/May13


Ignore:
Timestamp:
Apr 23, 2013 9:00:00 AM (23 months ago)
Author:
dreixel
Comment:

Add information about poly-kinded Typeable

Legend:

Unmodified
Added
Removed
Modified
  • Status/May13

    v12 v13  
    88We plan to put out a new major release 7.8.1 in November 2013. This will include several significant changes, including: 
    99 
    10   * polykinded Typeable library ['''Jose Pedro Magalhaes'''] 
     10  * '''Poly-kinded `Typeable`.''' 
     11  The `Typeable` class is now poly-kinded, meaning we can finally drop the boilerplate `TypeableN` classes. 
     12  The new definition of `Typeable` is as follows: 
     13 
     14  {{{class Typeable (a :: k) where typeRep :: proxy a -> TypeRep}}} 
     15 
     16  With this change comes the ability to derive `Typeable` instances for every user datatype, and even for 
     17  type classes. This means user defined instances of `Typeable` are unnecessary. Furthermore, since ill-defined 
     18  user instances can lead to runtime errors, they are now forbidden; the only way to get `Typeable` instances 
     19  is by using the deriving mechanism. User-defined instances will be ignored, with a warning. 
     20 
     21  Migrating to this new `Typeable` is easy. Code that only derived `Typeable` instances, and did not mention 
     22  any of the `TypeableN` classes, should work as before. Code that mentioned the `TypeableN` classes should be 
     23  adapted to replace these by the poly-kinded `Typeable` class. User-defined instances of `Typeable` should be 
     24  replaced by derived instances. 
     25 
     26  Additionally, a new compiler pragma `AutoDeriveTypeable` triggers automatic derivation of `Typeable` instances 
     27  for all datatypes and classes defined in the module. 
    1128 
    1229  * major improvements in DPH (vectorisation avoidance, new vectoriser) ['''Ben Lippmeier''']