[Aldor-l] Strange Error Message

Ralf Hemmecke ralf at hemmecke.de
Fri Jan 26 18:33:11 EST 2007


Can somebody from the Aldor developers explain how I should understand 
the following error message and what I should do about it.

"tcdistpoly.as", line 50:         assertEquals(T, t1/t2, t2*t1);
                           ..........................^
[L50 C27] #1 (Error) No one possible return type satisfies the context type.
   These possible return types were rejected:
           -- SparseIndexedPowerProduct(MachineInteger, MachineInteger)
The following could be suitable if imported:
   /: (SparseIndexedPowerProduct(MachineInteger, MachineInteger), 
SparseIndexedPowerProduct(MachineInteger, MachineInteger)) -> 
SparseIndexedPowerProduct(MachineInteger, MachineInteger) from 
SparseIndexedPowerProduct(MachineInteger, MachineInteger), if 
SparseIndexedPowerProduct(MachineInteger, MachineInteger) has  with /: 
(%, %) -> %



Before line 50 in the code one finds

I ==> MachineInteger;
T ==> SparseIndexedPowerProduct(I, I);
import from I, T;
t1: T := power(1, 1);
t2: T := power(2, 1);

And in SparseIndexedPowerProduct one finds

SparseIndexedPowerProduct(
     V: TotallyOrderedType, -- VariableType
     E: with {
             zero?: % -> Boolean;
             +: (%, %) -> %;
     }
): with {
         ...
	if E has with {-: (%, %) -> %; -: % -> %} then {
	        /: (%, %) -> %;
	}
} == add {
         macro {
                 X == rep x;
                 Y == rep y;
         }
         Rep == SparseAdditiveArray(E, V);
         import from Rep, E, V;
         ...
	if E has with {-: (%, %) -> %; -: % -> %} then {
	        (x: %) / (y: %): % == per(X - Y);
	}
}

and also SparseAdditiveArray implements -: (%, %) -> % if the same 
condition for E holds.

What can I do? Please help.

Ralf



More information about the Aldor-l mailing list