[Haskell-cafe] deriving
Anton van Straaten
anton at appsolutions.com
Tue Apr 8 10:57:11 EDT 2008
Hans Aberg wrote:
> On 8 Apr 2008, at 16:32, Anton van Straaten wrote:
>>> There are two processes here: deriving, i.e., inheriting an
>>> interface; and instantiating, i.e., producing running code. Haskell
>>> denotes derivation by "=>". And "data <a> deriving (b_1, ..., b_k)"
>>> is really a short for
>>> data <a>
>>> instance b_1 where <compiler implementation>
>>> ...
>>> instance b_k where <compiler implementation>
>>> So "instance" seems the word that should have been used.
>>
>> How about making "deriving x" an expression which means:
>>
>> instance x where <compiler implementation>
>>
>> This innovative solution will minimize changes to the Haskell
>> compiler, documentation, and programmer's brains.
>
> So what is the difference from the current state?
None. See how efficient a solution it is? ;)
More information about the Haskell-Cafe
mailing list