[Haskell-cafe] instance Binary UTCTime (Was: Oprhan instances)

Joachim Breitner mail at joachim-breitner.de
Wed Dec 2 17:03:52 EST 2009


Am Montag, den 30.11.2009, 00:30 +0000 schrieb Duncan Coutts:
> I should also note that distros will not look kindly on solutions that
> require N * M separate packages.

with my Debian-Developer hat on I can very much support this statement.
Which is why I’m so interested in a proper solution to the
instance-Providing-problem. And which is why I’m trying to revive the
thread now :-)

Would it be techically possible and feasible to write instance that do
not actually cause a dependency on the package that defines the class
resp. the data type? From a distributor point of view, I could live
quite well with a setup like this:
 * When the package providing class Foo is compiled, instances for all
interesting data types in the distribution are defined. This means a lot
of build-dependencies, but they are not too bad (although annoying).
 * The generated package does (somehow) not depend on all these data
packages. Of course, any part of the code that uses these data types,
especially the class instances, are only usable when the corresponding
package is also installed. I guess this would need compiler support, to
not choke on code that uses unknown data types.
 * Packages needing an instance Foo Bar would just depend on the packges
providing foo and bar, and the instance will be available and

This idea works symmetric: The instances could also be defined in the
data type package, with no hard dependency on the package providing the
class definition.


Joachim "nomeata" Breitner
  mail: mail at joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
  JID: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20091202/f3e38f94/attachment.bin

More information about the Haskell-Cafe mailing list