for review: add nested modules [2/5]
Simon Taylor
stayl at cs.mu.OZ.AU
Mon Mar 2 11:44:46 AEDT 1998
In mercury_compile.m
>@@ -128,25 +128,42 @@
>- process_module_2(Module)
>+ % Currently we don't allow directory names in the
>+ % command-line arguments, because it would confuse
>+ % the mapping between module names and file names.
>+ io__progname("mercury_compile", ProgName),
>+ io__write_string(ProgName),
>+ io__write_string(": Error in command-line argument `"),
>+ io__write_string(PathName),
>+ io__write_string("':\n"),
>+ io__write_string("arguments may not contain directory names.\n")
> ).
You should set the exit status here.
>@@ -367,16 +387,22 @@
> ;
> { Imports = Imports1 },
> { Error2 = no },
>- { Imports = module_imports(ModuleName, _, _, _, _) },
>+ { module_imports_get_module_name(Imports,
>+ ModuleName) },
> globals__io_lookup_bool_option(
> warn_missing_trans_opt_deps,
> WarnNoTransOptDeps),
> ( { WarnNoTransOptDeps = yes } ->
>+ { prog_out__sym_name_to_string(ModuleName,
>+ ModuleString) },
>+ { module_name_to_file_name(ModuleName,
>+ BaseFileName) },
> io__write_strings([
>- "Warning: Cannot read dependencies for `",
>- ModuleName, ".trans_opt'.\n",
>- " run `mmake main_module.depend' ",
>- "to remake the dependencies\n"])
>+ "Warning: cannot read trans-opt ",
>+ "dependencies for module `",
>+ ModuleString, "'.\n",
>+ " Run `mmake ", BaseFileName, ".depend' ",
>+ "to remake the dependencies.\n"])
> ;
> []
> )
You should check for --halt-at-warn here.
More information about the developers
mailing list