#5461: Reconfigurable pretty-printing in GHCi
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  7.2.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------
 Phil Wadler wants to control the pretty-printer used to display output in
 GHCi.  Something: adding a flag
 {{{
   -pretty <function-name>
 }}}
 The supplied function will typically have type `(C a => a -> String)` for
 some class C.  Using Razvan's libary, he could declare
 {{{
   :set -pretty GenericPretty.pretty
 }}}
 for example.

 Since this is GHCi-specific, one could use a new GHCi command instead:
 {{{
 :pretty GenericPretty.pretty
 }}}
 The latter design would presumably look up `GenericPretty.pretty` in the
 current context, and bleat if not found. The version with a flag might do
 that each time the pretty printer was used, which is arguably less
 efficient and (more important) more confusing.  Personally I think I
 prefer the `:pretty` command best.  (I'm not fussy about the name.)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5461>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to