
On Mon, Nov 10, 2014 at 11:31 PM, Simon Hengel
On Mon, Nov 10, 2014 at 10:25:45AM -0800, Greg Weber wrote:
What is the goal of this project? To pretty-print output? Or to be a slightly friendlier version of Show?
From my perspective display would be akin to str()/#to_s in Python/Ruby. So I was not thinking to tackle pretty-printing in general.
My *very personal* main use case, that I don't see other good solutions for, is string interpolation. Currently I have a crude hack in interpolate [1] that does the right thing for String, Text and many prelude types (see also [2] if you are curious).
But even more important to me is that we come up with something that is general, has minimal dependencies and is not controversial, so that people are willing to depend on it and provide instances.
Your interpolate package looks the same as shakespeare-text, and Display seems similar to ToText. http://hackage.haskell.org/package/shakespeare-2.0.1.1/docs/Text-Shakespeare... It would make sense to have a single Display typeclass.
[1] https://github.com/sol/interpolate/blob/9be1f6d15722c58e467e7ebc0cb6dc6fb2c4... [2] http://sol.github.io/interpolate-talk/