[Aldor-l] depending on tuples...

Christian Aistleitner tmgisi at gmx.at
Tue Apr 3 15:55:06 EDT 2007


Hello,

On Sat, 31 Mar 2007 09:26:59 +0200, Martin Rubey  
<martin.rubey at univie.ac.at> wrote:

> I'd like to have a dependent signature roughly as follows:
>
> F(t: Tuple PrimitiveType): SomeThing with {
>    g: (i: MachineInteger) -> List element(t, i);
> } == add {
> ...
> }
>
> [...]
>
> Any ideas?

Only one thing comes to my mind:
Replacing your g by
   g: (i: MachineInteger) -> ( T: PrimitveType, List T );
. This of course works. Within the implementation of the function use  
element( t, i ) for T. Of course, the "drawback" is that you have to  
return the Type you built the List from. But I assume you already knew  
about that solution.

Kind regards,
Christian




More information about the Aldor-l mailing list