instance visibility (was: Re: The base library and GHC 6.10)
Claus Reinke
claus.reinke at talk21.com
Wed Sep 24 13:48:15 EDT 2008
>> http://www.haskell.org/pipermail/libraries/2008-September/010623.html
..
>> 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;-).
Claus
More information about the Libraries
mailing list