Proposal for stand-alone deriving declarations?

Ketil Malde ketil+haskell at ii.uib.no
Fri Oct 6 07:19:11 EDT 2006


"Iavor Diatchki" <iavor.diatchki at gmail.com> writes:

> A question about the syntax:  would there be a problem if we made the
> 'deriving' declaration look like an instance?

And you might as well keep the 'instance' keyword when instantiating,
even if the instance is derived?  Seems more consistent to me
('deriving' feels more like a kind of parameter to 'data'
declarations) and avoids introducing a new keyword, except in the
context of instance declarations.

> deriving Show SomeType
> deriving Eq (AnotherType a)

  instance Show Sometype derived
  instance Eq (AnotherType a) where (==) = ...

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell-prime mailing list