On 05/01/2007 12:29 PM, Martin Rubey wrote:
> Ralf Hemmecke <[EMAIL PROTECTED]> writes:
> 
>> I wonder why
>>
>>  > getit(T: Category, L: Tuple T, i: MachineInteger): T == add {
>>  >         import from Tuple T;
>>  >         element(L, i);
>>  > }
>>
>> compiles.
>>
>> add {...} is an anonymous domain, that exports *nothing*.  T is a category.
> 
> I do not understand. In what way is that different from
> 
> CharacteristicSpecies(n:Integer)(L:LabelType): CombinatorialSpecies L == add {
>         Rep == SetSpecies L;
>         import from Rep;
>         nn: I == machine n;
>         <<implementation: CharacteristicSpecies>>
> }
> 
> ???  I would have thought that CombinatorialSpecies L is also a category. Take
> the example
> 
> getit(OutputType, (Boolean, Integer), 1)
> 
> I would expect that it returns a domain of type OutputType, which happens to 
> be
> Boolean, although we do not export that knowledge.

Oh, I am terribly sorry, I must have been totally unawake. Of course 
your getit returns a domain. But still, I don't know why it compiles.

As I said. Your "add {...}" thing considered as an anonymous domain 
exports *nothing*. Since putting into a context

A: CatA == add {...}

can only make the list of exports smaller. So that construction can 
never have any export.

What you probably want is

getit(T: Category, L: Tuple T, i: MachineInteger): T == {
     import from Tuple T;
     element(L, i);
}

without the "add" or perhaps (if the former does not work) somthing like

... == {
     import from Tuple T;
     element(L, i) add;
}

but I don't know whether that is something that is supposed to work.

Note that "A with {B}" is equivalent to "with {A; B}", but that does not 
apply if you replace "with" by "add".

Ralf

PS: What you do is to construct a domain whose exports are computed at 
runtime. There should be no problem, but if you look at some references 
at Axiom-Portal, there are some papers that discuss the semantics of 
runtime-computed categories.

Ralf

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to