[ANN] show-combinators: a minimal pretty-printing library for Show instances

25 Feb
2018
25 Feb
'18
8:28 p.m.
Hello, Sometimes it is necessary to handwrite instances for Show, Show1, Show2, or some other simple pretty-printer for ADT-like structures (because they might not be easily derived via existing means). base has a few combinators in Prelude, Text.Show, and Data.Functor.Classes. But they require explicit handling of spacing and precedence levels, which is generally error-prone and repetitive, since ADTs all look the same. This new library, show-combinators, contains just a dozen of functions to encapsulate all of those details, so the code left to write can more closely match the structure of the type to show. http://hackage.haskell.org/package/show-combinators I hope you will also find it useful. Cheers, Li-yao
2690
Age (days ago)
2690
Last active (days ago)
0 comments
1 participants
participants (1)
-
Li-yao Xia