[m-rev.] diff: cleanup module_qual and middle_rec

Ralph Becket rafe at cs.mu.OZ.AU
Mon Mar 21 11:50:28 AEDT 2005


Zoltan Somogyi, Sunday, 20 March 2005:
> compiler/module_qual.m:
> 	Convert this module to our current coding style. Use state variables
> 	where appropriate. Reorder arguments as required to allow the use of
> 	state variables. Use error_util instead of io__write_string to print
> 	error messages. Use predmode declarations where possible. Use . as
> 	the module name separator.
> 
> 	There are no algorithmic changes except for the use of error_util.
> 
> compiler/middle_rec.m:
> 	Convert this module to our current coding style. Use predmode
> 	declarations where possible.
> 
> compiler/make_hlds.m:
> compiler/mercury_compile.m:
> 	Conform to changed argument orders of predicates in module_qual.m.
> 
> compiler/error_util.m:
> 	Add a new version of the utility predicate that puts commas and "and"s
> 	between elements of a list.
> 
> 	Fix an old bug: when printing a symname/arity pair, put quotes around
> 	only the symname part.

These changes look fine.

> tests/invalid/*.err_exp:
> tests/invalid/purity/*.err_exp:
> tests/recompilation/*.err_exp.2:
> tests/warning/*.exp:
> 	Update the expected error messages to reflect the better wrapping we
> 	get from error_util, and in some cases to reflect the fixed code for
> 	quotes around symnames.

> Index: tests/invalid/cyclic_typeclass.err_exp
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/tests/invalid/cyclic_typeclass.err_exp,v
> retrieving revision 1.1
> diff -u -r1.1 cyclic_typeclass.err_exp
> --- tests/invalid/cyclic_typeclass.err_exp	19 Jan 2005 05:53:06 -0000	1.1
> +++ tests/invalid/cyclic_typeclass.err_exp	18 Mar 2005 13:03:31 -0000
> @@ -1,4 +1,4 @@
>  cyclic_typeclass.m:030: Error: cyclic superclass relation detected:
> -cyclic_typeclass.m:030:   `cyclic_typeclass.bar/1' <= `cyclic_typeclass.foo/1'
> -cyclic_typeclass.m:030:   <= `cyclic_typeclass.bar/1'
> +cyclic_typeclass.m:030:   `cyclic_typeclass.bar'/1 <= `cyclic_typeclass.foo'/1
> +cyclic_typeclass.m:030:   <= `cyclic_typeclass.bar'/1
>  For more information, try recompiling with `-E'.

Personally, I think if you're going to change the quoting, you should
get rid of it altogether here.  Moving the arity outside the quotes
makes these error messages less readable, IMO.

-- Ralph
--------------------------------------------------------------------------
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