On Wed, Nov 01, 2006 at 12:30:31PM -0600, Brian Smith wrote:
In response to your point about duplicate derived instances, yes, it
would make derived instances different from explicit ones, but as I've
argued before, I think it's unavoidable:
http://www.haskell.org/pipermail/haskell-prime/2006-October/thread.html#1739
If you accept that this is the primary use of the standalone feature,
such conflicts will happen all the time.
How an instance is defined (explicitly or derived) should have nothing to do with how it is imported/exported in a module.
In particular, I think having features like :
import M1 hiding (instance C T)
and
module M hiding (instance C T)
would eliminate the need for special-case handling of derived instances (if two imported modules happen to derive the same instances, you can just hide the instances from one of them). Instance hiding is an important feature in its own right.
- Brian
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime