Splitting SYB from the base package in GHC 6.10

Ross Paterson ross at soi.city.ac.uk
Wed Sep 3 07:57:50 EDT 2008


Another attempt:

These [standard] instances are uncontroversial and can accompany the
Data class:

    [] Maybe Either () tuples
    Bool Ordering Char Double Float Integer
    Int Int8 Int16 Int32 Int64 Word Word8 Word16 Word32 Word64

These instances could also be [standard], after fixing:

    Ratio Complex

These instances are [partial]:

    DataType TyCon TypeRep Handle
    Ptr StablePtr ForeignPtr

> That depends on whether the [partial] 'Data' instances can be
> completed in a sensible way for these types. If they can't, then
> the way forward would be to split the 'Data' class into those
> operations supported by all current instances and those only
> supported by the types in [standard]. That way, one would the
> presence of instances would at least be indicative of the presence
> of instance methods, providing more static type safety. But if the
> 'Data' class and some instances are in 'base', there'd be no
> changing them (*).

Unless anyone can imagine a completion for these types, it seems the
fix must await restructuring of the Data class, so these might as well
accompany the Data class too.

Stuff in base can be changed, just not easily or quickly.  And given
that Data is tied up with GHC, that may be unavoidable.


More information about the Libraries mailing list