I would personally would argue that solution 2 (content depends on compiler) is the least offensive solution. Just incorporate any Typeable and Data derivings behind CPP guards, and just set a flag in the cabal file that defaults to true, which adds the existing DeriveDataTypeable language feature. Its self-contained and exists precisely for this purpose, and doesn't require all of the power of Rank2Types or GeneralizedNewtypeDeriving.
 
Admittedly with 2, you get different contents on different platforms, but the only content you are missing in a minimalist "Haskell 98 + addenda + CPP"-only environment is instances that probably can't exist on that platform anyways, since Data.Data.Data is full of Rank-2 types.
 
One could argue that a hand-implemented rank 2 Data.Data.Data instance is more portable than a DeriveDataTypeable provided Data.Data.Data instance, but at that point I think maintainability becomes a factor, plus you can further counter-argue that you don't actually need Rank-2 types to define a Data.Data.Data instance, merely to define the class, and the arguments could go back and forth for days.
 
Heck the existing containers library is so gauche about this as to just guard its definitions for Data behind an #if __GLASGOW_HASKELL__ block, so by comparison the DerivingDataTypeable approach is fairly compassionate to third party distributions and provides a clear path for them to belly up to the bar if they want the instances. =)
 
-Edward Kmett
 
On Tue, Jun 2, 2009 at 1:42 PM, Ashley Yakeley <ashley@semantic.org> wrote:
Ashley Yakeley wrote:
Malcolm Wallace wrote:
OK, I object to the proposed change.  The time library is pretty core,
and should continue to be buildable by compilers and interpreters other
than GHC.  This does not necessarily mean it must be strictly H'98
compliant, but that would be a good approximation of the common
language.

What is that "good approximation"?

These are the options:

I forgot, time already requires CPP...

1. time to require Haskell 98 + FFI + CPP + Rank2Types, include Data instances


2. time to require Haskell 98 + FFI + CPP, content depends on compiler

3. time to require Haskell 98 + FFI + CPP, a time-extras package with orphan Data instances


--
Ashley Yakeley
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries