Skip to main content

ansi-wl-pprint Is Deprecated!?!?

I was catching up on some project maintenance tasks this morning and happened to notice that the ansi-wl-pprint library is deprecated. I use this library in many projects because optparse-applicative uses it. Investigating, I discovered that it has been deprecated since November 2020!

The ansi-wl-pprint library is deprecated in favor of prettyprinter, a “modern” take on Wadler/Leijen pretty printing. The library looks quite nice! Some features that I particularly appreciate are better annotation support and use of Text instead of String.

There is an optparse-applicative issue about using prettyprinter, opened in 2017! The maintainer is very careful about stability and backwards compatibility, and there is no indication that a migration will happen any time soon. I agree with Chris Dornan’s comment:

I am in favour of the switch to prettyprinter because that seems to be the direction of travel for the wider ecosystem — I am basically converting from prettyprinter for optparse applicative.

All said, however, I love the care and attention you are taking on this and everything, your wilingness to engage and your emphasis on stability. There is no urgency. A model for the rest of us.

Author

Travis Cardwell

Published

Tags