The base library and GHC 6.10
ross at soi.city.ac.uk
Wed Sep 3 07:59:16 EDT 2008
On Wed, Sep 03, 2008 at 09:17:16AM +0100, Simon Marlow wrote:
> This raises the more general issue of instance-visibility. Since
> instances are automatically re-exported and therefore break abstraction
> barriers, the only sensible way to think about instances is as global
> Attempting to limt the visibility of instances by putting them in
> separate packages or modules is futile. If an instance exists in a
> library *anywhere*, it potentially exists *everywhere*, and we should
> think of it as global. The only way to limit the visibility of instances
> is to not put them in a package.
> That means, for the particular case of the Data class, someone should
> decide once and for all whether there is an instance for IO, or
> functions, or whatever, and either define them along with the Data class
> or not at all.
I agree with all that, but there may not be time to be confident of
making the right decision in all these cases in time for 6.10.
More information about the Libraries