| A while back I wrote to you about support of pretty printing in GHC.
| The idea is to have a deriving class similar to Show, which produces
| documents for pretty printing.  As I recall, you suggested that I
| produce a complete implementation, and then it would be easy for you
| to incorporate into GHC.

There are two questions here. 

* If it was easy to generate the boilerplate for deriving Outputable instances
  in GHC itself, would we use it?

  Yes, probably, to some extent.  But remember that many Outputable instances
  don't print constructor names etc; they print in user-friendly syntax.  So
  I'm not sure how *much* we'd use it.  Still, it could be useful when debugging
  and you want to print something that doesn't yet have an Outputable instance.

* What's the best way to generate the boilerplate?  You mention two methods; 
probably
  either is fine. You might also consider the Utrecht approach, described in
  "A generic deriving mechanism for Haskell", 
http://www.dreixel.net/research/pdf/gdmh_nocolor.pdf
  which is about to appear in GHC.

Simon


| 
| I have a student who has been awarded an EPSRC bursary over the summer
| to perform this work.  I was going to suggest he begin by looking at:
| 
|   Scrap More Boilerplate: Reflection, Zips, and Generalised Casts
| 
| which appears to be the basis for deriving Data and Typeable in GHC.
| As I recall, you also suggested
| 
|   Extensible and Modular Generics for the Masses
| 
| Does it matter which of these two schemes is used?  Yours,  -- P


_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to