Files
mercury/tests/valid/higher_order2.m
Simon Taylor 0ceed741d1 Bug fixes for higher_order.m and unused_args.m
Estimated hours taken: 8

Bug fixes for higher_order.m and unused_args.m

NEWS
	Removed the message about bugs in unused_args.m and higher_order.m

compiler/options.m
	Re-enabled higher_order and unused_args.

compiler/unused_args.m
	Fixed so that this now handles partially instantiated
	deconstructions correctly.

compiler/higher_order.m
	Two bug fixes:
	Specialization of types for specialized versions of predicates.
	Fixed handling of curried arguments.

compiler/inlining.m, compiler/type_util.m:
	Moved inlining:apply_substitution_to_type_map and
	inlining:apply_rec_substitution_to_type_map to type_util.m
	for use in the higher_order.m bug fix.

library/varset.m
	Added predicate varset__new_vars which returns a list of new
	variables.

library/term.m
	Added predicates term__apply_variable_renaming(_to_list)
	to apply a variable renaming (map(var, var)) to a term
	or list of terms.

library/map.m
	Added map__det_insert_from_corresponding_lists to insert
	multiple key-value pairs into a map.

tests/valid/{Mmake, higher_order2.m, higher_order3.m, unused_args_test2.m}
	Tests for the bug fixes.
1996-04-24 05:21:50 +00:00

19 lines
432 B
Mathematica

% Tests currying of arguments in specialized versions.
:- module higher_order2.
:- import_module list.
:- pred ppp(pred(int, int), list(int)).
:- mode ppp(pred(in, out) is det, in) is det.
ppp(_, []).
ppp(P, [H0|T0]) :-
call(P, H0, H),
ppp(P, T0).
:- pred qqq(list(int), pred(int, int)).
:- mode qqq(in, pred(in, out) is det) is det.
qqq(L, F) :-
ppp(lambda([I::in, O::out] is det, call(F, I, O)), L).