The question is not so much whether the rules are followed as to *when* a type (domain and category, perhaps even package) becomes named. Note that the examples given in Davenport are for domains, not categories. Are there differences in handling between named domains and named categories? unnamed domains and unnamed categories?
(6) -> x:List Integer:=[1,2,3] (6) [1,2,3] --- assume that in (6), List Integer is unnamed. Type: List Integer (7) -> y:List Integer:=x (7) [1,2,3] --- so is (7) Type: List Integer (8) -> t == List Integer Type: Void --- assume that (8) is named (9) -> z:t:=x t is not a valid type. --- what does this error message mean? (9) -> t ==> List Integer Type: Void --- is (9) named or not? According to compiler output, a macro is --- handled in the same way as a function definition. (see --- http://wiki.axiom-developer.org/AnonymousCategories/diff ) (10) -> z:t:=x (10) [1,2,3] --- looks like (9) is unnamed? Type: List Integer (11) -> s:=List Integer (11) List Integer --- (11) should be considered named? Type: Domain (12) -> w:s:=x (12) [1,2,3] --- but it works just like unnamed? There is also the complication that the above is done via the interpreter. William "Weiss, Juergen" wrote: > I found the old document about type equivalence in Scratchpad. It's: > A New Algebra System, May, 29 th 1984, James H Davenport. I have only > found a paper version. Maybe someone has an online version. > > It states that: > 1. Two named types are only equivalent if the names are the same. > 2. Anonymous types are equivalent when stucturally equivalent > 3. An anonymous type is never equivalent to a named type. > > So following 1. > > t1 == List Term > t2 == List Term > x : t1 > y : t2 > y := x > > is not supposed to work, > > but following 2. > > x : List Term > y : List Term > y := x > > is ok, > > and following 3. > > t == List Term > x : List Term > y : t > y := x > > is not supposed to work as well > > All examples are taken from the paper. > > I am not sure how much of this design is preserved in the current > system. But without having had an intense look at the examples, > I got the impression, that they follow the rules above. > > Regards > > Juergen Weiss > > Juergen Weiss | Universitaet Mainz, Zentrum fuer Datenverarbeitung, > [EMAIL PROTECTED]| 55099 Mainz, Tel: +49(6131)39-26361, FAX: > +49(6131)39-26407 > > _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer