[m-rev.] for review: explicit streams

Julien Fischer jfischer at opturion.com
Tue Nov 1 02:09:18 AEDT 2022


On Mon, 31 Oct 2022, Zoltan Somogyi wrote:

> Pass streams explicitly at the top levels.
> 
> compiler/mercury_compile_main.m:
> compiler/mercury_compile_front_end.m:
> compiler/mercury_compile_llds_back_end.m:
> compiler/mercury_compile_make_hlds.m:
> compiler/mercury_compile_middle_passes.m:
> compiler/mercury_compile_mlds_back_end.m:
>     Pass progress and error streams explicitly in these top modules
>     of the compiler. Use "XXX STREAM" to mark places where we could switch
>     from using stderr for both the progress and error streams to using
>     module-specific files as the progress and/or error streams.

...

> compiler/write_module_interface_files.m:
>     Get these modules to take an explicitly specified stream to which
>     to write progress messages when they are invoked from mercury_compile_*.m.
>
>     For predicates in these modules that can be invoked both directly
>     by mercury_compile_*.m *and* by other modules, the latter effectively
>     as a subconstractor, make them take a maybe(stream), with the intention

s/subconstractor/subcontractor/

>     being that all the other modules that use the predicate as a subconstractor

Ditto.

>     would pass a "no". This avoids the need to pass progress streams
>     down to the internals of other passes, and also avoids overwhelming
>     the user invoking the compiler with unnecessary details.

That's fine otherwise.

Julien.



More information about the reviews mailing list