[m-dev.] Replacing lists of items with a more structured representation

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Apr 3 12:51:03 AEST 2007


On Mon, 2 Apr 2007, Zoltan Somogyi wrote:

> While I was converting old code to use the new representation, I found
> lots of places where the code was a bit strange for no good reason that
> I could see. I marked those places with XXXs or ZZZs. I would like to
> ask the help of those who have worked with the item_list representation
> to have a look at the current version of the diff (which is far from
> final yet), especially the parts marked by XXX or ZZZ, and give me feedback,
> since I think this kind of review will be a more effective method of
> finding and fixing bugs than using mdb.

+                % XXX This code here duplicates the functionality of
+                % the old predicate split_clauses_and_decls. Parts of it
+                % look decidedly dodgy: I think too many kinds of things
+                % (e.g. mutables and externals) are being included in
+                % the private interface.

If `:- external' declarations are being included in private interfaces then
that is probably just an oversight.

Mutables are not being included in the private interfaces.  The predicate
handle_mutable_in_private_interface/3 (which is called from
make_private_interface/7) expands them into the pred and mode declarations
for the appropriate access predicates.

(I think the code to which the above XXX was attached should abort if it sees
a mutable declaration.)

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list