links icon indicating copy to clipboard operation
links copied to clipboard

use OPAM pprint package

Open jamescheney opened this issue 5 years ago • 1 comments

PP.ml is an implementation of Wadler-style pretty printing adapted to a call by value language. The OPAM package pprint appears to be similar enough that we could use it instead with few changes.

We are currently using PP.ml only in irtojs where it is used to pretty print JavaScript code. It might make sense to use the pprint library in other places, such as for SQL printing, instead of the current rather low level Format. (It looks like pprint can be used with Format as a backend to print large things efficiently.)

jamescheney avatar Nov 12 '20 18:11 jamescheney

We should definitely use it in value.ml too! The current implementation of value printing is rather obscure.

dhil avatar Nov 12 '20 20:11 dhil