Template Haskell changes to names and package keys

Edward Z. Yang ezyang at mit.edu
Sat May 2 00:45:24 UTC 2015


Excerpts from Dan Burton's message of 2015-05-01 15:05:18 -0700:
> #1 looks like harmless bikeshedding. (Keep the old mkPkgName and pkgString
> and `type PkgName = PkgKey` as synonyms for a deprecation cycle or two?).

It's not that harmless: there really was a semantic change, and most
users of mkPkgName did, in fact, break when GHC 7.10 was released (this
change was prompted by two separate reports of TH code which was
synthesizing these IDs breaking.)

> As for #2, searchPackage struck me as odd at first. What could a TH user do
> with a list of packages that are all "the same version"? As specified, it's
> rather opaque. However, it occurs to me that if the Package data type has
> some information about, for example, the [Package] that it was built
> against, then perhaps some useful things could be done via TH with this
> information.

Yes. Admittedly, I have a hard time thinking of uses for this function,
but it doesn't cost us too much to add.

Edward


More information about the Libraries mailing list