[m-rev.] [reuse] diff+question: change aliasing type

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Jun 29 15:47:26 AEST 2004

On 28-Jun-2004, Nancy Mazur <Nancy.Mazur at cs.kuleuven.ac.be> wrote:
> in the change below I moved some code that transforms 'aliasing' types back to
> strings to prog_data, so that it can be used in the "attributes_to_strings"
> procedure. The problem is that in the implementation of these transformation
> procedures, I rely on some procedures from module mercury_to_mercury. Hence, I
> introduce a circular dependency. I know this is not good, but I don't see a way
> to avoid this, unless I transform aliasing-types to bare minimal strings,
> instead of the complete user-declared-aliasing? 

Since attributes_to_strings is called from only one place, and that is in
mercury_to_mercury.m, the simplest solution would be to move the whole
predicate attributes_to_strings to mercury_to_mercury.m.

If you look at the predicates that convert values of types declared in
prog_data.m into strings, whether they are in prog_data.m itself, prog_out.m
or in mercury_to_mercury.m is in a significant part a historical accident.
Don't be afraid to move stuff around between these modules if you think
there is a good reason.

mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe

More information about the reviews mailing list