for review: add nested modules [1/5]

Simon Taylor stayl at cs.mu.OZ.AU
Mon Mar 2 11:43:43 AEDT 1998


Hi Fergus,

>Add support for nested modules.

This looks pretty good. Just a few minor comments:

>	- when creating the `.int' file, it was reading in the
>	  interfaces for modules imported in the implementation section,
>	  not just those in the interface section.
>	  This meant that the compiler missed a lot of errors.

Regression test in tests/invalid?

In dead_proc_elim.m
>@@ -39,7 +40,7 @@
> :- mode dead_pred_elim(in, out) is det.
> 
> :- type entity		--->	proc(pred_id, proc_id)
>-			;	base_gen_info(string, string, int).
>+			;	base_gen_info(module_name, string, int).
> 

The layout of this type declaration doesn't follow the coding standard.

In intermod.m:
>-% Constructors should be explicitly type qualified.
>+% Constructors should be explicitly type qualified. (XXX why?)

They probably don't need to be any more - this comment
was written before module qualification of constructors was
implemented.

>@@ -594,6 +592,8 @@
> 		{ Functor = cons(qualified(TypeModule, ConsName), ConsArity) },
> 		{ DoWrite = yes }
> 	;
>+		% XXX for (perhaps partially) qualified functor symbols,
>+		% should we still add the module qualifier from the type?
> 		{ Functor = Functor0 },
> 		{ DoWrite = yes }

I think so. It can't hurt.



More information about the developers mailing list