
On Tue, Dec 28, 2010 at 07:03:57PM +0100, Johan Tibell wrote:
The deepseq package depends on the containers package. This forces all packages that want to depend on deepseq in order to provide a NFData instance for exported types, to also depend on containers.
Proposal, have containers depend on deepseq, not the other way around, and define the NFData instances for the types in the containers package, in the containers package.
I think you're saying that generally it seems more sensible for packages providing types to include the class instances, and I think I agree with that general principle. However, I think types in the GHC bootlibs should be an exception to this rule. Otherwise any classes that someone wants the bootlibs to have an instance for will need to be added to the bootlibs, and we'd like to keep the set of bootlibs as small as possible. While it's true that this makes any NFData users depend (transitively) on containers, that's not a problem, because everyone has containers anyway. If we decided to add NFData to bootlibs in its own right (e.g. if we wanted to use it in GHC or haddock) then reversing the dependency would make sense, but I don't think it's worth doing just for the sake of it. Thanks Ian