[Haskell-cafe] Pretty-printer for Text

Stephen Tetley stephen.tetley at gmail.com
Wed Oct 27 03:39:39 EDT 2010


Hi Ivan

You're free to do what you want in your own package, but...


Having a Pretty class plus primitive printers int, bool is an
advantage. For ints, bools, ... code tends to look neater if you use
int or bool rather than pretty. Plus for ints and others you tend to
need things like hex printers anyway, so one size via a type class
doesn't fit all. As for the class - if I have a reasonably sized
syntax tree I'd rather just do

> pretty a

... than formulate a naming scheme like:

> prettyExpr a

Regards

Stephen


More information about the Haskell-Cafe mailing list