[m-rev.] diff: better determinism error messages

Fergus Henderson fjh at cs.mu.OZ.AU
Tue May 18 13:26:32 AEST 2004


On 14-May-2004, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Index: compiler/det_report.m
> -"	Since the type has a user-defined equality predicate, I must\n",
> -"	presume that there is more than one possible concrete\n",
> -"	representation for each abstract value of this type.  The success\n",
> -"	of this unification might depend on the choice of concrete\n",
> -"	representation.  Figuring out whether there is a solution to\n",
> -"	this unification would require backtracking over all possible\n",
> -"	representations, but I'm not going to do that implicitly.\n",
> -"	(If that's really what you want, you must do it explicitly.)\n"
...
> +		VerbosePieces = [words("Since the type has a user-defined"),
> +			words("equality predicate, I must presume that"),
> +			words("there is more than one possible concrete"),
> +			words("representation for each abstract value"),
> +			words("of this type. The success of this unification"),
> +			words("might depend on the choice of concrete"),
> +			words("representation. Figuring out whether there is"),
> +			words("a solution to this unification would require"),
> +			words("backtracking over all possible"),
> +			words("representations, but I'm not going to do that"),
> +			words("implicitly. (If that's really what you want,"),
> +			words("you must do it explicitly.")],

There's a missing close-parenthesis in the new error message.

> +			words("implicitly. (If that's really what you want,"),
> +			words("you must do it explicitly.")],
> +		write_error_pieces_not_first_line(Context, 0, VerbosePieces,
> +			!IO)

Likewise here.

Otherwise that looks great!

-- 
Fergus Henderson                    |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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