[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] "has" and "with" (was curious algebra failure)
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] "has" and "with" (was curious algebra failure) |
Date: |
Mon, 13 Aug 2007 13:51:08 +0200 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070728) |
| Isn't the problem whether 'Monad has SetCategory with "*":(%,%)->%' ?
If the question is formulated in terms of "has", then I think the answer
is unambiguously "yes".
Gaby, if you are going to implement "yes", then we should keep in mind
that the Aldor compiler currently does not allow categories as the first
argument of "has" and the AUG.pdf p.96 "Has expressions" is clear about
this.
I must say, I am in favour of relaxing that to allow also categories as
the first argument. The reason is a conditional export in the definition
of List in LibAldor.
l: List(PrimitiveType) := [Integer, String]
should be OK (PrimitiveType is the category that only exports
=: (%, %) -> %
). But internally List makes conditional tests of the form
List(T:Type): ListType T == add {
...
if T has PrimitiveType then {
removeAll(t:T, l:%):% == {...}
...
}
}
So giving a category as an argument to the List constructor results in a
segmentation fault at runtime. The compiler does not catch that case at
compile time.
In fact, I believe one should be able to distinguish domains from
categories. Impossible currently with Aldor.
It seems to me that the compiler asks the question in terms of coercible,
instead of "has".
Oh, that would surprise me even in SPAD. Where should the "coerce"
function come from?
Ralf
- Re: [Axiom-developer] "has" and "with", (continued)
- Re: [Axiom-developer] "has" and "with", Ralf Hemmecke, 2007/08/16
- Re: [Axiom-developer] "has" and "with", Gabriel Dos Reis, 2007/08/16
- Re: [Axiom-developer] "has" and "with", Ralf Hemmecke, 2007/08/16
- Re: [Axiom-developer] "has" and "with", Gabriel Dos Reis, 2007/08/16
- Message not available
- Re: [Axiom-developer] "has" and "with", Gabriel Dos Reis, 2007/08/16
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), William Sit, 2007/08/13
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), Gabriel Dos Reis, 2007/08/13
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), Bill Page, 2007/08/13
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), Gabriel Dos Reis, 2007/08/13
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure), Gabriel Dos Reis, 2007/08/13
- Re: [Axiom-developer] "has" and "with" (was curious algebra failure),
Ralf Hemmecke <=
- Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure), Gabriel Dos Reis, 2007/08/13
- Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure), Ralf Hemmecke, 2007/08/13
- RE: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebrafailure), Weiss, Juergen, 2007/08/13
- Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure), Bill Page, 2007/08/13
- Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure), Gabriel Dos Reis, 2007/08/13
- Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure), Bill Page, 2007/08/13
- [Axiom-developer] Another strange coercion, Franz Lehner, 2007/08/13
- Re: [Axiom-developer] Another strange coercion, Ralf Hemmecke, 2007/08/14
- [Axiom-developer] SubDomain in SPAD and not in Aldor, Ralf Hemmecke, 2007/08/16
- Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure), Gabriel Dos Reis, 2007/08/13