instance visibility (was: Re: The base library and GHC 6.10)
claus.reinke at talk21.com
Wed Sep 24 13:48:15 EDT 2008
>> What one cannot do (in Haskell 98) is to have two instances of
>> the same class, for the same types, in the same import hierarchy.
> Of course, when you consider that Main, by definition, imports every
> module in the program directly or indirectly, this is pretty close to
> saying `instances are global'. Isn't it?
Close, but no cigar!-) The global view accepts strictly more
programs than the Haskell 98 view (see the mesage I linked
to for an example). It would also refuse some programs that
Ghc (in non-Haskell 98 mode) accepts. And would stand in
the way of looking for more precise instance import/export
control (see both of my messages;-).
More information about the Libraries