I'm glad you like it! When printing *lists*, there's also pprDeeperList (or something like it). Often you want to cut off after a certain number of elements.
Simon | -----Original Message----- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of pepe | Sent: 15 November 2007 09:56 | To: Simon Marlow | Cc: [email protected] | Subject: Re: patch applied (ghc): GHCi debugger: added a new flag, -fno-print-binding-contents | | The bunch of patches I just pushed make use of the ppr_deeper | primitives from Outputable, and now we cut the output at the depth(and | width) given by opt_PprUserLength. | I wasn't aware that this functionality was available in Outputable: it | is quite amazing what one can do with these in a few lines of code! | I have also improved some other bits of the Term pretty printer and am | quite satisfied with the end result. | | Cheers | pepe | | On 14/11/2007, at 10:48, Simon Marlow wrote: | | > All I meant was that we should use a more refined notion of "depth | > limit" which does a good job of cutting off the output before it | > grows too large. That might mean limiting not only the depth, but | > the width too, for example. | > | > Cheers, | > Simon | > | > pepe wrote: | >> To clarify, this is only when doing ':show bindings', not when | >> doing ':print'. | >> Ensuring that the output given never gets too large would mean | >> arbitrarily cutting it to make it fit, or giving the user some | >> control over these settings. I remember talking to you about this | >> in ICFP, and I got the impression you thought it was overkill. Did | >> I misunderstand ? | >> For now we have a shallow (fixed) depth limit in the term | >> reconstruction step which helps to limit the size of terms, but | >> unfortunately not the size of the output given by the pretty | >> printer. I plan to experiment with Pretty.fullRender with well- | >> chosen settings, that should be a big win. Any other suggestion | >> will be very appreciated. | >> pepe | >> On 14/11/2007, at 10:17, Simon Marlow wrote: | >>> Pepe Iborra wrote: | >>>> Tue Nov 13 09:45:39 PST 2007 Pepe Iborra <[EMAIL PROTECTED]> | >>>> * GHCi debugger: added a new flag, -fno-print-binding-contents | >>>> The contents of bindings show at breakpoints and by :show | >>>> bindings | >>>> is rendered using the same printer that :print uses. | >>>> But sometimes the output it gives spans over too many lines and the | >>>> user may want to be able to disable it. | >>> | >>> Then wouldn't it be better to ensure that it never gets too | >>> large? Or is that too hard? | >>> | >>> Cheers, | >>> Simon | > | | _______________________________________________ | Cvs-ghc mailing list | [email protected] | http://www.haskell.org/mailman/listinfo/cvs-ghc _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
