336 Seq.map(fn (uarg', ed') => (uarg'::uargs, ed')) |
336 Seq.map(fn (uarg', ed') => (uarg'::uargs, ed')) |
337 (mc (rbinder, targs,eta_norm env (rbinder, Envir.head_norm env uarg), |
337 (mc (rbinder, targs,eta_norm env (rbinder, Envir.head_norm env uarg), |
338 (env, dpairs))); |
338 (env, dpairs))); |
339 (*Produce sequence of all possible ways of copying the arg list*) |
339 (*Produce sequence of all possible ways of copying the arg list*) |
340 fun copyargs [] = Seq.cons( ([],ed), Seq.empty) |
340 fun copyargs [] = Seq.cons( ([],ed), Seq.empty) |
341 | copyargs (uarg::uargs) = |
341 | copyargs (uarg::uargs) = Seq.maps (copycons uarg) (copyargs uargs); |
342 Seq.flat (Seq.map (copycons uarg) (copyargs uargs)); |
|
343 val (uhead,uargs) = strip_comb u; |
342 val (uhead,uargs) = strip_comb u; |
344 val base = body_type env (fastype env (rbinder,uhead)); |
343 val base = body_type env (fastype env (rbinder,uhead)); |
345 fun joinargs (uargs',ed') = (list_comb(uhead,uargs'), ed'); |
344 fun joinargs (uargs',ed') = (list_comb(uhead,uargs'), ed'); |
346 (*attempt projection on argument with given typ*) |
345 (*attempt projection on argument with given typ*) |
347 val Ts = map (curry (fastype env) rbinder) targs; |
346 val Ts = map (curry (fastype env) rbinder) targs; |