[m-rev.] for review: error messages for mutables

Julien Fischer juliensf at cs.mu.OZ.AU
Sun Sep 11 19:46:38 AEST 2005


On Sun, 11 Sep 2005, Julien Fischer wrote:

> @@ -590,18 +645,34 @@
>  %-----------------------------------------------------------------------------%
>
>  add_item_clause(Item, !Status, Context, !ModuleInfo, !QualInfo, !IO) :-
> -    Item = clause(VarSet, PredOrFunc, PredName, Args, Body),
> +    Item = clause(Origin, VarSet, PredOrFunc, PredName, Args, Body),
>      ( !.Status = exported ->
> -        list.length(Args, Arity),
> -        %
> -        % There is no point printing out the qualified name since that
> -        % information is already in the context.
> -        %
> -        unqualify_name(PredName, UnqualifiedPredName),
> -        ClauseId = simple_call_id_to_string(PredOrFunc,
> -            unqualified(UnqualifiedPredName) / Arity),
> -        error_is_exported(Context, "clause for " ++ ClauseId, !IO),
> -        module_info_incr_errors(!ModuleInfo)
> +        (
> +            Origin = user,
> +            list.length(Args, Arity),
> +            %
> +            % There is no point printing out the qualified name since that
> +            % information is already in the context.
> +            %
> +            unqualify_name(PredName, UnqualifiedPredName),
> +            ClauseId = simple_call_id_to_string(PredOrFunc,
> +                unqualified(UnqualifiedPredName) / Arity),
> +            io.write_string("Clause for ", !IO),
> +            io.write(Item, !IO),
> +            io.nl(!IO),

The above three lines were not meant to be part of this diff; please
ignore them.

Cheers,
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