Martin Rubey <[EMAIL PROTECTED]> writes:

> Remains the bug concerning the interplay of map and sum.

got that one, too. Consider the following snippet:

        import from I, Z, Q, P, DataStream P;
        cisSet: CycleIndexSeries := cycleIndexSeries $ SetSpecies(Z);
        g: Generator CycleIndexSeries := generate {
                for k:I in 1.. repeat {
                        d: DataStream(P) := stretch(cisSet, k)::DataStream(P);
                        s := map((p: P): P +-> inv(k::Z)*p)(d);
                        s.0 := 0;
                        yield s :: CycleIndexSeries;
                }
        }

For some reason, Aldor does not create a closure for the argument of map 

(p: P): P +-> inv(k::Z)*p

i.e., it treats k as a global variable there. I don't have the time to figure
out why, but introducing a new function

local makeMap(q: Q)(p: P): P == q*p;

and then modifying the above to read

                        s := map(makeMap inv(k::Z))(d);

cures the problem.

All tests pass now. (debug with -q1; ordinary still fails to compile because of
a missing export...)



Martin


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to