Changes to Data.Typeable
marlowsd at gmail.com
Mon Jul 11 10:36:41 CEST 2011
On 10/07/2011 08:51, Yitzchak Gale wrote:
> Simon Marlow wrote:
>> In response to this ticket:
>> === Proposed API changes ===
>> 1. DEPRECATE mkTyCon...
>> 2. Add
>> mkTyCon3 :: String -> String -> String -> TyCon
>> ...Most users can just derive Typeable, there's no need
>> to use mkTyCon3.
>> In due course we can rename mkTyCon3 back to mkTyCon.
> Anecdotally, it seems to me that many, if not most,
> packages on Hackage that create Typeable instances
> do so using mkTyCon, not by deriving Typeable.
> There seems to be some standard boilerplate that
> spreads virally from one library to the next.
> Perhaps it would be worth checking to what extent
> mkTyCon is used on Hackage. If this is as widespread
> as I suspect, even a simple deprecation warning could
> have a cascading effect on typical output from cabal
If there are a lot of packages using mkTyCon (I've already encountered
one, so you might well be right), what do you suggest? Deprecation is
the gentlest way we have to signal that something needs to be fixed.
Perhaps deprecation warnings should be piped into "sendmail
<package-author>" instead of being printed :-)
More information about the Libraries