[m-rev.] diff: fix failure of debugger/declarative/browse_arg
Julien Fischer
juliensf at cs.mu.OZ.AU
Wed Jun 7 17:23:16 AEST 2006
On Wed, 7 Jun 2006, Julien Fischer wrote:
> On Wed, 7 Jun 2006, Mark Brown wrote:
>
> > On 07-Jun-2006, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> > > The various pretty printers and their format options seems to have grown
> > > organically and without a common intended consistant behaviour.
> > > I'm not sure having different format options for print, print-all and
> > > the browser makes a whole lot of sense,
> >
> > Right or wrong, that was a deliberate design decision, IIRC. The rationale
> > was along the lines of print-all needing to be more limited so that values
> > could fit onto one line (since there will be multiple values printed),
> > whereas print can afford to use more lines. Likewise, different parameters
> > make sense for the different formats, since they wouldn't necessarily
> > require the same space to show the same information.
> >
> > The intent was that users who don't want to think in this detail can just
> > omit the -APBfpv options, whereupon they should get consistent behaviour.
> >
> > Whether this has proven to be the right choice I can't say, since my .mdbrc
> > just contains
> >
> > format_param depth 10
> > format_param size 60
> >
> > and I don't make use of different parameters for different modes/formats.
> >
> > > especially in the context of the
> > > declarative debugger.
> >
> > There may have been some confusion as to whether the declarative debugger
> > should be considered to be like "print" or "browse". I don't recall if a
> > final decision was ever made. Perhaps we should have made the declarative
> > debugging output a fourth mode, with its own parameters?
>
> One thing to keep in mind is that the command to print something in
> the declarative debugger is (currently) "print"
... except if the thing to be printed is an I/O action. In that case
the print-all configuration parameters are used. Unfortunately there
is no way to set them from within the declarative debugger, i.e. the
size, depth, lines and width commands apply only to the print
configuration parameters. This is what is currently causing
debugger/declarative/sort to fail**. I'm thinking of adding the following
commands to the declarative debugger:
size io <n>
depth io <n>
width io <n>
lines io <n>
These would modify the print-all configuration parameters.
(** A simpler fix for this test case would be to set the depth in the
procedural debugger before invoking the declartive debugger. The point of
this particular test case it to make sure that read_line_as_string_2 is
passing invalid pointers back to Mercury - how the formatting commands work
isn't really an issue for this one.)
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list