[erlang-questions] Pretty-printing Erlang

Kostis Sagonas <>
Wed Oct 27 11:35:03 CEST 2010


Richard O'Keefe wrote:
> On 21/10/2010, at 6:33 PM, Bengt Kleberg wrote:
> 
>> The clean up effect you describe as the beyond the scope of a pretty
>> printer might be achieve by tidier
>> (http://www.erlang-factory.com/conference/London2009/speakers/kostissagonas).
> 
> I cannot connect to the http://tidier.softlab.ntua.gr/ site;
> is that still the correct site for tidier?

The website for tidier is up and running again for those that want to 
use it.

(We have had serious trouble with the air conditioning system in the lab 
and several disks have been hit or mounted read only since last Friday.)

>> The problem with several body level expressions on one line is a problem
>> that I either avoid by having long variable/function names, or fix
>> manually after wards. It would be nice to get it done automatically.
> 
> The problem here is that the original code didn't *have* several
> expressions on one line; erl_tidy *un*tidied that code.

FYI: Tidier is using the same infrastructure as erl_tidy, namely the 
erl_prettypr module, and its output is untidied in similar respects, I 
am afraid. Not much can be done about it, at least until the parser is 
adapted to also maintain comments and white spaces.

Kostis


More information about the erlang-questions mailing list