[m-rev.] for review: improve $pred for methods

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Apr 7 12:23:20 AEST 2008


On Mon, 7 Apr 2008, Peter Wang wrote:

> Estimated hours taken: 1.5
> Branches: main
>
> Make `pred_id_to_string' a meaningful string for instance methods defined
> using clause syntax.  Previously it returned "type class method
> implementation" which is unhelpful as a substitution for the
> implementation-defined literal `$pred'.

It was unhelpful otherwise as well.

> compiler/hlds_pred.m:
> 	Remember the method name in the `origin_instance_method' option of
> 	`pred_origin'.
>
> compiler/check_typeclass.m:
> 	Add the method name to the constructions of `origin_instance_method'.
>
> compiler/hlds_out.m:
> 	Make `pred_id_to_string' produce better output, as above.
>
> compiler/layout_out.m:
> compiler/mode_errors.m:
> compiler/polymorphism.m:
> compiler/typecheck.m:
> 	Conform to changes above.
>
> tests/hard_coded/impl_def_literal.exp:
> tests/hard_coded/impl_def_literal.m:
> 	Test `$pred' in method implementations.

That looks fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list