gf: Ticket #3: Macros/operations in abstract syntax
http://trac.haskell.org/gf/ticket/3
<p>
Specifying a list in abstract syntax is cumbersome: <tt>(ConsA a (ConsA b (BaseA c)))</tt>
</p>
<p>
Simpler would be <tt>(ListA3 a b c)</tt>, where <tt>ListAn</tt> is series of macros (which is autogeneraded, just as <tt>ConsA</tt> and <tt>BaseA</tt>):
</p>
<pre class="wiki">oper ListA1 : A -> [A] = \a -> BaseA a;
oper ListA2 : A -> A -> [A] = \a,b -> ConsA a (BaseA b);
oper ListA3 : A -> A -> A -> [A] = \a,b,c -> ConsA a (ConsA b (BaseA c));
...
</pre><p>
Overloading would make it even simpler, but perhaps that's too difficult
</p>
<p>
There are also other circumstances, but this is what I thought of now.
</p>
en-usgfhttp://trac.haskell.org/gf/chrome/common/trac_banner.png
http://trac.haskell.org/gf/ticket/3
Trac 0.11.1