erl_pp fixes

Thomas Lindgren thomasl_erlang@REDACTED
Wed Mar 26 19:51:06 CET 2003


erl_pp misbehaves for fun:s.

1. for a "fun f/1" with Extra info, it fails to print
(INVALID-FORM). This has been fixed.

2. the Extra info is printed with ~p, which means the
printed data can't be read back when line breaking
occurs. This has been fixed (the cost is that printing
the Extra may overflow the line).

(For future work, one might possibly not need to see
the Extra at all.)

3. I also made funs print like case/if/..., since
that's the way they normally are indented. The same
for 'query ... end' expressions.

The new code successfully prettyprints previously
problematic funs. I haven't tried 'query'.

Enclosed is a manual patch (to show what was done) and
a new erl_pp.erl for convenience.

Best,
Thomas

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: erl_pp_patch.txt
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20030326/ebf2ffb6/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erl_pp.erl
Type: application/octet-stream
Size: 14648 bytes
Desc: erl_pp.erl
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20030326/ebf2ffb6/attachment.obj>


More information about the erlang-patches mailing list