Proposal for stand-alone deriving declarations?

Brian Smith brianlsmith at
Sun Oct 8 14:11:23 EDT 2006

On 10/8/06, Bjorn Bringert <bringert at> wrote:
> I agree that "derive" would be nicer, but as you say, the problem is
> that it would add a new keyword. Since the declaration would then
> start with "derive", I don't that think it could easily be made into
> a special identifier. A deriving declaration would look like this:
> derive Eq Foo
> which looks just like the beginning of a declaration of a function
> called "derive" which does some pattern matching, if derive can also
> be an identifier.

That is why I suggested "derive instance." Then the only ambiguity comes
when "derive" is used as a name immediately before an instance declaration.
which should be really, really rare. It's not 100% backward compatible but
it is a better compromise than using "deriving."

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Haskell-prime mailing list