[Aldor-l] aldor weakness (bug?)

Ralf Hemmecke ralf at hemmecke.de
Sat Dec 17 12:13:56 EST 2011


Dear Stephen,

the attached program seems to demonstrate a weakness (bug?) in the Aldor 
compiler.

Shouldn't the semantics of Foo (without -DPRETEND) be equivalent with

-------
JAP  ==> Join(AdditiveType, PrimitiveType)
EJAP ==> Evalable(R pretend JAP)

Foo(R: PrimitiveType): with {
   *: (R, %) -> %;
   if R has AdditiveType then {
     if R has EJAP then Evalable(R pretend Join(EJAP, JAP));
   }
} == add {
	(r: R) * (x: %): % == x;
}
-------

i.e. each "if R has T" yields to an augmentation of the original type of 
R by T, ie. R: Join(T, PrimitiveType)?

If you classify this as a bug, would you have a pointer to the code 
where this could be fixed?

Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugParametrizedDoubleConditional.as
Type: application/x-applix-spreadsheet
Size: 1268 bytes
Desc: not available
URL: <http://a2s23.a2hosting.com/pipermail/aldor-l_aldor.org/attachments/20111217/4aa1aace/attachment.bin>


More information about the Aldor-l mailing list