[m-rev.] for review: improvements to deep profiler
Julien Fischer
juliensf at cs.mu.OZ.AU
Wed Aug 24 15:25:31 AEST 2005
On Wed, 24 Aug 2005, Zoltan Somogyi wrote:
> On 24-Aug-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > > > +:- func inactive_items_to_string(inactive_items) = string.
> > > > +
> > > > +inactive_items_to_string(inactive_items(hide, hide)) = "hh".
> > > > +inactive_items_to_string(inactive_items(show, hide)) = "sh".
> > > > +inactive_items_to_string(inactive_items(hide, show)) = "hs".
> > > > +inactive_items_to_string(inactive_items(show, show)) = "ss".
> > > > +
> > > > +:- pred string_to_inactive_items(string::in, inactive_items::out) is semidet.
> > > > +
> > > > +string_to_inactive_items("hh", inactive_items(hide, hide)).
> > > > +string_to_inactive_items("sh", inactive_items(show, hide)).
> > > > +string_to_inactive_items("hs", inactive_items(hide, show)).
> > > > +string_to_inactive_items("ss", inactive_items(show, show)).
> > > >
> > >
> > > Making the above one predicate with two modes would be better.
> > >
> > It is convenient to have a function version.
>
> Yes, but the implementation of the function should be to just call the
> predicate in one its modes.
>
Fixed. I've changed all the similar predicates/functions in this module
as well.
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