Splitting SYB from the base package in GHC 6.10

Ross Paterson ross at soi.city.ac.uk
Tue Sep 2 18:21:10 EDT 2008


On Tue, Sep 02, 2008 at 09:46:09PM +0100, Claus Reinke wrote:
> 2 the "standard"/"dubious" separation of instances was entirely preliminary;
>    following the recent discussion, I would suggest to split the
>    instances into three groups, in three separate modules:
>
>    [standard]: fully implemented 'Data' instances (no runtime errors).
>                     one should probably reclassify 'Ratio a' in here.
>
>    [partial]: partially implemented instances (usually for abstract
>                     types, which 'Data' doesn't handle well; whether
>                     that can be mended without changing the class
>                     remains to be seen); these include 'Array a b',
>                     'ThreadId', etc (previously in 'Standard') and the
>                     pointer types (previously in 'Dubious'); if these
>                     instances can be completed, existing clients will
>                     simply work better (fewer runtime crashes)

If the Data class, your [standard] instances (including Ratio and Complex)
and the instances for FFI pointer types are in base, then the packages you
listed (array, bytestring, containers, haskell-src, network, packedstring
and template-haskell) need no longer depend on syb, and syb need no
longer be a boot package.  That would give maximal freedom to develop
syb independently, wouldn't it?  (Changes to Data can't be independent
of GHC, and the instances of the types listed are canonical, aren't they?)

This wouldn't allow you to hide the partial instances for the pointer
types, but it would be hard to stop them leaking anyway, as they're used
by several of the above packages.


More information about the Libraries mailing list