Proposal for stand-alone deriving declarations?
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:
> 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)
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-prime