Proposal for stand-alone deriving declarations?

Brian Smith brianlsmith at gmail.com
Wed Nov 1 16:15:38 EST 2006


On 11/1/06, Ross Paterson <ross at soi.city.ac.uk> wrote:
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-prime/attachments/20061101/960808c3/attachment.htm


More information about the Haskell-prime mailing list