[m-rev.] for review: move char_to_doc to pretty_printer.m

Julien Fischer jfischer at opturion.com
Tue Dec 20 11:37:01 AEDT 2022


On Tue, 20 Dec 2022, Zoltan Somogyi wrote:

>> I would note that the only reason that pretty_printer.m seesm to import
>> a lot of above modules is to initialise the default formatter map.
>> Another way of addressing the problem may be to initialise that map
>> in the stdlib initialisation code in library.m (which necessarily
>> imports all the relevant modules anyway).
>
> That addresses *a* problem, but not the one I and Peter are targeting,
> which is the huge SCC in the .trans_opt dependency graph of the
> library modules. Having e.g. int.m import pretty_printer.m means that
> every library module that needs to increment an int by 1 depends on
> pretty_printer.m through int.m. My diff does not fix this immediately,
> but sets it up to be fixed when the forwarding functions are deleted.
>
> By the way, I am just now moving the intN_to_doc functions
> from intN.m to pretty_printer.m, and I noticed that the default
> formatter map has entries for int and uint, but not intN and uintN.
> I presume that is an oversight, and not a deliberate choice.

Yes, it's an oversight.

Julien.


More information about the reviews mailing list