Generic interface to pretty-printing libraries inspired by 'parsers'