
Greg Fitzgerald wrote:
Is it possible to automatically derive instances of Pretty http://haskell.org/ghc/docs/latest/html/libraries/haskell-src/Language-Haske...? If no, what do most do when it comes to pretty-printing large data types?
We do it manually. Usually you have to decide anyway which bits to omit or add (only implicitly indicated by a data constructor) and if you compose things vertically or beside (or nested or whatever) to make it look pretty. HTH Christian see i.e an abstract syntax at: http://www.dfki.de/sks/hets/src-distribution/daily/Hets/docs/CASL-AS_Basic_C... the pretty printer code is here http://www.dfki.de/sks/hets/src-distribution/daily/Hets/CASL/ToDoc.hs our pretty printer wrapper (for text and latex tailored for Hets) http://www.dfki.de/sks/hets/src-distribution/daily/Hets/docs/Common-Doc.html (try "versions" instead of "daily", if a "daily" went wrong)