[Aldor-l] exports and constants
Ralf Hemmecke
ralf at hemmecke.de
Tue Jul 25 05:19:50 EDT 2006
On 07/25/2006 07:16 AM, Christian Aistleitner wrote:
> Hello
>
>
>> stdout << ( A has CatA) << newline;
>> stdout << ((A add) has CatA) << newline;
>>
>> It still does not compile. But it should. Both A and "A add" are domains
>> of type CatA.
>
> Why should (A add) be of static type CatA? (I assume you meant static
> type although has checks the dynamic type, which of course is something
> different. The Aldor compiler complains about the static type of "A add".)
If I read Section 7,8 of the AUG
http://www.aldor.org/docs/HTML/chap7.html#8
I would say the type of "A add" is CatA (the same as for "A").
From the AUG 7.8:
The type of the expression A add B is
C with { x1: T1; ...; xn: Tn }
here C is the type of A, and x1,...,xn are the symbols defined
(using ==) in B, whose types are T1,...,Tn, respectively.
Ralf
More information about the Aldor-l
mailing list