Hey, everyone! I’m really excited to announce an initial (0.x
) release of purs-tidy
: a syntax tidy-upper for PureScript.
I call it a tidy-upper because it’s pretty forgiving, so I don’t know if I’d go so far as to say it will strictly format your code, but it’ll shore-up all the edges! I expect it to be used with defaults, but it does support some configuration.
- Turn unicode on or off, or print as-is
- Arrow-last (purty) style, or arrow-first in type signatures.
- Some configuration that
dodo
supports (indent, page-width, ribbon-width).
It has some nice features as well:
- It’s written completely in PureScript!
- Supports operator precedence configuration. Ships with a default precedence table based on core/contrib, but you can generate your own for your project if you’ve got lots of operators.
- Supports parallelism, so it can format your codebase over multiple workers.
There’s still quite a few rough edges, but I’ve been able to run it over my work codebase, and everything continues to compile! It’s performance is usable, but not stellar (in absolute terms). Our codebase is 150K+ lines of code, and it formats it in about 11 seconds on my 6 year old laptop.
Again, this is just an initial release (0.x), so a lot may change and improve. I hope y’all enjoy it!
Special thanks to @thomashoneyman and @colinwahl for providing lots of feedback, help with CI, and for pushing me to actually release it .