Proposal for stand-alone deriving declarations?
Simon Peyton-Jones
simonpj at microsoft.com
Thu Oct 5 04:36:54 EDT 2006
Thanks for doing this.
Is this the syntax we settled on? I remember we discussed it at some length
S
| -----Original Message-----
| From: haskell-prime-bounces at haskell.org [mailto:haskell-prime-bounces at haskell.org] On Behalf Of
| Bjorn Bringert
| Sent: 05 October 2006 09:05
| To: haskell-prime at haskell.org
| Subject: Proposal for stand-alone deriving declarations?
|
| On http://hackage.haskell.org/trac/haskell-prime/wiki/
| DerivedInstances it says:
|
| "- There is no way to derive an instance of a class for a data type
| that is defined elsewhere (in another module)."
|
| Though there is no proposal to fix this. Would such a proposal be
| appropriate for Haskell'?
|
|
| If so, I propose to add a top-level declaration on the form:
|
| 'deriving' qtycls 'for' qtycon
|
| which produces the same instance as a deriving clause in the
| declaration of the datatype or newtype would.
|
|
| I have recently (thanks to the GHC Hackathon) implemented this in GHC.
|
| /Björn
|
| _______________________________________________
| Haskell-prime mailing list
| Haskell-prime at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-prime
More information about the Haskell-prime
mailing list