Hi,
I'm trying to take the cross product of two finite streams using nested 'cloptr' and I can't get it to typecheck, here's what I have:
fun foo(s:int): stream_vt(stream_vt(@(int,int))) =
stream_vt_map_cloptr<int><stream_vt(@(int,int))>(
streamize_intrange_lr(1,10),
lam(i) =<cloptr1>
stream_vt_map_cloptr<int><(int,int)>(
streamize_intrange_lr(1,10),
lam(j) =<cloptr1> @(i,j)
)
)
I want to cross (1..10) with (1..10) and get a stream of (1,1),(1,2),(1,3) ... but I get an error on the 'lam(j) =<cloptr1> @(i,j)' line:
...: dereference cannot be performed: the proof search for view located at [S2Evar(i(14251))] failed to turn up a result.
...: the dynamic expression cannot be assigned the type [S2Etyrec(flt0; npf=-1; 0=S2Ecst(int), 1=S2Ecst(int))].
The same thing works if instead of nesting a 'stream_vt_map_cloptr' I construct an explicit 'fun loop' inside the body of the first 'lam' that takes 'i' as an argument.
Why is there a difference?