instance visibility (was: Re: The base library and GHC 6.10)
ross at soi.city.ac.uk
Wed Sep 24 11:13:38 EDT 2008
On Wed, Sep 24, 2008 at 03:59:12PM +0100, Simon Marlow wrote:
> Claus Reinke 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 properties.
>> I've heard this fatalistic view expressed before, and even for
>> impoverished Haskell 98, it just isn't true. Perhaps it has come about
>> from years of being bitten by either #2182, by attempts
>> to avoid "orphan" instances, by carelessly designed libraries, or
>> by careless instance imports, all of which make combining libraries
>> that provide instances of the same class for the same type a pain?
> No, it has nothing to do with bugs or misfeatures in GHC, it's a fact of
> Haskell 98.
Except for #2356, which some people think is a feature.
(Not me, though)
More information about the Libraries