Closed coltfred closed 7 years ago
I will pull this and test it out with my stuff tomorrow. Looks great!
@tpolecat I incorporated your comments. Please do let me know if you have more or if you see anything weird. I still need to write more tests, but it's getting late. :sleeping:
This is looking great, thanks :-)
I didn't get time to look into why, but I noticed that printing the help doc for SubparserExample
(sbt "test:runMain net.bmjames.opts.test.example.SubparserExample --help"
) seems to be non-terminating.
@bmjames I'll take a look tonight. Thanks for finding that!
@bmjames @tpolecat Turns out my port from haskell didn't take into consideration that haskell's laziness is awesome. I was literally exploring the entire rendering space even if I didn't have to. I went from calling findBestCore
53,758,517
times to calling it 390
. Needless to say, it's much faster now. :laughing:
Also, just for completeness sake, the test @bmjames was running would eventually terminate, it just takes 60+ seconds.
Do either of you have other complaints?
It looks good to me.
@tpolecat, did you get a chance to try it out?
I haven't. I will do that today.
Yep, sorry for the delay. Tried it out and works great. 👍
@coltfred Would you mind reverting the changes to README and squashing the rest of the commits please? Then I'll merge.
The README changes are fine, but I'd like to apply them when I'm ready to make a release, as the latest release referred to in the README (0.5) still contains the Kiama dependency.
I wish there were a better way to manage doc changes that need to be "on hold" until a release. I run into this too.
@bmjames I've reverted. You can squash my branch into one commit on master using the squash and merge feature that was added earlier this year. https://github.com/blog/2141-squash-your-commits
Would you still like me to squash or will that be acceptable?
@coltfred That will be entirely acceptable, thanks for pointing that out!
Thanks for the changes, and also thanks @tpolecat for reviewing.
This is a proposed resolution for #7. I ported Wadler's paper http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf in a fairly straight forward way. I needed to add
column
andnesting
which are improvements that have been made to the haskell PPrint lib.I need to add a few more tests, but the laws hold and manual testing of argument lists looked good.
cc/ @bmjames @tpolecat - Thoughts?