[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Problem kTuple wish 2.
From: |
Ralf Hemmecke |
Subject: |
[Axiom-developer] Problem kTuple wish 2. |
Date: |
Tue, 26 Jun 2007 14:19:17 +0200 |
User-agent: |
Thunderbird 2.0.0.4 (X11/20070604) |
* certain difficulties transforming Tuples
I assume your talking about the issues raised in the article I mentioned
above?
I just checked. Although I'm still not completely sure, but I think the
problem we have is that Tuples are *not quite* first class citizens, quite
contrary to the recommendation of PollThompson.
Suppose you want a constructor like
M(T: Tuple Cat): MCat(T) == add {...}
for some given category Cat (For simplicity, lets say
define Cat: Category == with {=:(%,%)->Boolean}
. The question now is how do I define MCat and the corresponding add
{...} in such a way that I am able to generate an element of M in a
simple form.
Basically, I want to say...
import from Integer, String, Boolean;
import from M(Integer, String);
import from M(String, String, Boolean);
a := m(4,"a");
b := m("x", "y", true);
Do you have an idea how to define the function m generically?
Also I would probably like to have
s: String := b.2;
i: Integer := a.1;
q: Boolean := b.3;
Try to define this apply function.
Important, I want to have as much type safety as possible, i.e. If I
would have written
c := m(1, "x", false);
the compiler should already shout that the type of the first argument
doesn't fit.
Good luck.
Ralf
- [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/25
- Re: [Axiom-developer] Axisp news, C Y, 2007/06/25
- Re: [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/25
- Re: [Axiom-developer] Axisp news, Martin Rubey, 2007/06/25
- Re: [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/25
- Re: [Axiom-developer] Axisp news, Martin Rubey, 2007/06/26
- Re: [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/26
- Re: [Axiom-developer] Axisp news, Martin Rubey, 2007/06/26
- Re: [Axiom-developer] Axisp news, Martin Rubey, 2007/06/26
- [Axiom-developer] Problem kTuple wish 2.,
Ralf Hemmecke <=
- [Axiom-developer] Re: Problem kTuple wish 2., Stephen Wilson, 2007/06/26
- Re: [Axiom-developer] Axisp news, Ralf Hemmecke, 2007/06/26
- Re: [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/26
- Re: [Axiom-developer] Axisp news, Martin Rubey, 2007/06/26
- Re: [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/26
- Re: [Axiom-developer] combinat mailing list, Martin Rubey, 2007/06/26
- Re: [Axiom-developer] combinat mailing list, Stephen Wilson, 2007/06/26
- Re: [Axiom-developer] Axisp news, Ralf Hemmecke, 2007/06/26
- Re: [Axiom-developer] Axisp news, Stephen Wilson, 2007/06/26
- Re: [Axiom-developer] Axisp news, Ralf Hemmecke, 2007/06/26