Changes http://wiki.axiom-developer.org/AldorLanguageRestrictions/diff
--
It is possible to compile the following code (more
or less similar to your example above):

\begin{aldor}
#include "axiom"

define fooey: Category == with { foo:%->% }

define Foo(b: Boolean): Category == with {
  bar: % -> ();
  if b then fooey;
}
\end{aldor}

Apparently this can be used with only limited
success (both foo and bar are present independent
of the value of b :(

\begin{axiom}
)sh Foo
)sh Foo(true)
)sh Foo(false)
\end{axiom}

The following is a more complete example of *conditional definition*
as shown at:
http://www.csd.uwo.ca/~watt/aldor/UserGuide/chap7.html
\begin{aldor}
#include "axiom"
define Fooey: Category == with { foo:%->% }
define Barey: Category == with { bar:%->() }
Dom(b: Boolean): Barey with {
  if b then Fooey;
} == add {
  bar(x: %): () == {};
  if b then {
    foo(x: %): % == x;
  }
}
\end{aldor}

Unfortunately Axiom/Aldor seem to think this is funny!
--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]

Reply via email to