[m-rev.] Re: for review: fix lambda expansion misordered arguments

Peter Wang novalazy at gmail.com
Tue Sep 27 16:34:26 AEST 2011


On 2011-09-27, Peter Wang <novalazy at gmail.com> wrote:
> The lambda expansion pass sometimes created predicates with misordered
> arguments, e.g. in a different order to that of the modes, and with type_info
> variables not at the front of the list.

Actually, the last part is not true.  Change that sentence to:

    The lambda expansion pass sometimes created predicates with misordered
    argument modes.

A concrete example of the problem is this:

--- library/exception.hlds_dump.110-lambda      2011-09-27 16:29:26.545080567 +1000
+++ stage2.asm_fast.gc/library/exception.hlds_dump.110-lambda   2011-09-27 16:28:02.122811508 +1000
@@ -3250,7 +3250,7 @@
 % address is taken
 % does not contain parallel conjunction
 % does not contain user event
-:- mode 'IntroducedFrom__pred__try_all_det__579__1'((pred((free >> ground)) is multi), (ground >> ground), (free >> ground)) is multi.
+:- mode 'IntroducedFrom__pred__try_all_det__579__1'((ground >> ground), (pred((free >> ground)) is multi), (free >> ground)) is multi.
 exception.'IntroducedFrom__pred__try_all_det__579__1'(TypeInfo_for_T, WrappedGoal, HeadVar__3) :-
   V_31 = exception.wrap_exception(TypeInfo_for_T),
   TypeCtorInfo_56 = type_ctor_info("exception", "exception_result", 1),
@@ -3275,7 +3275,7 @@
 % address is taken
 % does not contain parallel conjunction
 % does not contain user event
-:- mode 'IntroducedFrom__pred__try_all_det__589__1'((pred((free >> ground)) is nondet), (ground >> ground), (free >> ground)) is nondet.
+:- mode 'IntroducedFrom__pred__try_all_det__589__1'((ground >> ground), (pred((free >> ground)) is nondet), (free >> ground)) is nondet.
 exception.'IntroducedFrom__pred__try_all_det__589__1'(TypeInfo_for_T, WrappedGoal, HeadVar__3) :-
   V_47 = exception.wrap_exception(TypeInfo_for_T),
   TypeCtorInfo_72 = type_ctor_info("exception", "exception_result", 1),
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list