Arc Forumnew | comments | leaders | submitlogin
1 point by rntz 3405 days ago | link | parent

It also doesn't handle long '[]s correctly.

    arc> (ppr '[+ 2 _ a very long bracket fn causes extra parens])
    [(+ 2 _ a very long bracket fn causes extra parens)]t
Your ppr has a rather significant number of bugs it seems.

1 point by shader 3405 days ago | link

well, it is a complicated function. At the very least, it is better than the old version.

That bug must have creeped in because it calls ppr again on the body if it needs to wrap. I'm not 100% sure how to fix it though. Maybe print the first and then map ppr over the rest?

The question is, how to get br-fns to properly indent their bodies. Maybe ppr needs an option to avoid printing the parens.


1 point by shader 3399 days ago | link

I've fixed the bug, and it has been pushed to github but not to arc master. I'm going to try and port it to arc3 first.