[Haskell-cafe] question about show

Simon Marechal simon at banquise.net
Thu Mar 6 07:17:04 UTC 2014

On 03/06/2014 05:21 AM, Mateusz Kowalczyk wrote:
> ‘print’ is great and no one is going to abandon
> in because one of the 30 fields in their structure happens to be a function.

I write Pretty instances, it's much easier thanks to all the
combinators, it is better suited for human consumption (some libraries
have colours), and it's not confusing. Once you have good Pretty
instances, you also have great logging and error messages, as opposed to
some string that only makes sense to a developer.

The only drawback are the orphan instances, if you really need to
defined them for a type that's not yours (but you usually don't).

More information about the Haskell-Cafe mailing list