[m-rev.] for review: remove unnecessary imports from .int files

Ralph Becket rafe at cs.mu.OZ.AU
Fri Jan 21 12:45:40 AEDT 2005


Julien Fischer, Friday, 21 January 2005:
> 
> Estimated hours taken: 22
> Branches: main
> 
> Do not include `:- import_module' and `:- use_module' declarations
> in the implementation section of .int and .int2 files unless
> the types that they export are required by the definition of
> an equivalence type.  This should help prevent unnecessary
> recompilations when new imports are made in the implementation
> of modules.
> 
> Break up check_hlds.type_util so that predicates that do
> not require access to the HLDS are placed in a new module,
> parse_tree.prog_type.  The above change requires some of
> requires some of these predicates.  This also removes one

"requires some of" is duplicated.

> of the dependencies between the parse_tree package  on
> modules of the check_hlds package.
> 
> Remove the remaining such dependency by moving
> inst_constrains_unconstrained_var/1 from check_hlds.inst_util
> to parse_tree.prog_mode.  None of the modules in parse_tree
> now depend upon modules in check_hlds.
> 
> Modify the parser so that import_module declarations
> that specify more than one module are replaced by multiple
> import_module declarations, with one module per declaration.
> This makes the above change easier to implement and is in
> any case required by the upcoming diff for canonicalizing
> module interfaces.  We also doe the same for use_module and

s/doe/do/

> include_module declarations.

> +	% strip_unnecessary_impl_imports(NecssaryModules, !Items).
> +	%
> +	% Remove all import_module and use_module declarations for
> +	% modules that are not in `NecessaryModules',
> +	%
> +	% NOTE: This will only work if each item corresponding
> +	% to an import_module or use_module declaration only imports
> +	% a single module.  (This should be the case, see prog_io.m.)

s/This/this/ - only Americans capitalise after a colon.

Otherwise that looks fine.
--------------------------------------------------------------------------
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