[Aldor-l] Boolean known to the Aldor language?

Ralf Hemmecke ralf at hemmecke.de
Sat Nov 17 11:26:40 EST 2007


Please compile

---BEGIN bbb.as
Type: with == add;
define CatA: Category == with;
define CatB(A: Type): Category == with {
	if A has CatA then CatA;
}
---END bbb.as

via "aldor bbb.as". My compiler (1.1.0) tells me

 >aldor bbb.as
"bbb.as", line 3: define CatB(A: Type): Category == with {
                   .......................................^
[L3 C40] #1 (Fatal Error) Missing vital semantic information: please add 
`import from Boolean' to this scope!

I somehow have the impression that "Boolean" must be built-in, how else 
would "if" statements be possible? However, Boolean is defined in 
LibAldor or AxlLib.

On page 146 it says that LibAldor "extends Boolean", but looking at 
lib/aldor/src/base/sal_base.as, I find...

Boolean: PrimitiveType with {...} == add {
	Rep == Bool;
         ...
}

That doesn't look like "extend"ing Boolean.

Of course, that all is a bootstrapping process, but I would somehow like 
to see a clearer cut between language defined stuff provided by the 
compiler and extensions through libraries.

Stephen, is the *name* "Machine" really part of the Aldor language 
(which is claimed in the AUG p. 148)? Or could I simply rename Machine 
to MyMachine in all library sources of Aldor and the output (.ao files) 
would be identical?

Why are some types "magic"? (see AUG page 150). FileName is not part of 
LibAldor so it cannot be "magic". Also Axllib does not define 
"MachineInteger", so also that cannot be magic. So what is the actual 
definition of "magic type"?

Ralf





More information about the Aldor-l mailing list