src/Pure/unify.ML
changeset 17344 8b2f56aff711
parent 16934 9ef19e3c7fdd
child 18184 43c4589a9a78
equal deleted inserted replaced
17343:098db1bc1e59 17344:8b2f56aff711
   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;