[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Unions in Spad (Correction)
From: |
Stephen Wilson |
Subject: |
Re: [Axiom-developer] Unions in Spad (Correction) |
Date: |
13 Jul 2007 21:48:51 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
William Sit <address@hidden> writes:
[...]
> (4) -> j1 case 1
>
> >> Error detected within library code:
> upcase: bad Union form
>
> protected-symbol-warn called with (NIL)
>
> Perhaps a better error message should be given, like:
> (5) -> j1.tag2
>
> >> Error detected within library code:
> (0 . 1) cannot be coerced to mode (Integer)
>
> protected-symbol-warn called with (NIL)
I know where the second error message is generated (and I think even
that could be better). The first I dont know off hand. But I can put
this issue into my todo list.
[...]
> >> The construction is related to the bug in Union when the domains are not
> >> distinct (but
> >> the
> >> tags are): In Union(a:A, b:B) where A = B, the two coerce functions (one
> >> from A to %
> >> and
> >> one from B to %) coincides, with no way to distinguish the two.
> >
>
> Should be the two "construct" functions.
Perhaps the best solution in this case is as Bill Page suggested,
implementing keyword arguments in Axiom, allowing us to write [a:1] or
[b:1] thus enabling unambiguous specification of the branch.
Note too that this, I believe, is a necessary first step in getting
defendant types working in Spad. Currently there is no propagation of
binding information in the `modemaps' for functions. We could look at
how is information is retained for functors and perhaps find some
inspiration for making it work in arbitrary functions (after all, the
mechanics is effectively already in place for dependent types as
handled by domain constructors).
Sincerely,
Steve
- Re: [Axiom-developer] Unions in Spad, (continued)
- Re: [Axiom-developer] Unions in Spad, William Sit, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, William Sit, 2007/07/15
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/15
- Re: [Axiom-developer] Unions in Spad (Correction), William Sit, 2007/07/13
- Re: [Axiom-developer] Unions in Spad (Correction),
Stephen Wilson <=
- [Axiom-developer] Re: keyword arguments, was: Unions in Spad (Correction), Martin Rubey, 2007/07/14
- Re: [Axiom-developer] Re: keyword arguments, was: Unions in Spad (Correction), Bill Page, 2007/07/21
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Stephen Wilson, 2007/07/13
- Re: [Axiom-developer] Unions in Spad, Gabriel Dos Reis, 2007/07/13
- rep, per, Rep in SPAD/Aldor, was: Re: [Axiom-developer] Unions in Spad, Ralf Hemmecke, 2007/07/13
- Re: rep, per, Rep in SPAD/Aldor, was: Re: [Axiom-developer] Unions in Spad, Gabriel Dos Reis, 2007/07/13