[m-dev.] trivial diff: parenthesize `instance' and `typeclass'

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Oct 31 13:18:22 AEDT 2000


Estimated hours taken: 0.1

Fix a bug reported by Peter Ross, where the compiler
generated a syntactically invalid `.int' file if you
named a module `instance'.

compiler/mercury_to_mercury.m:
	Add `typeclass' and `instance' as mercury_unary_prefix_ops,
	to ensure that we parenthesize them when necessary.

Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.176
diff -u -d -r1.176 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m	2000/10/13 13:55:37	1.176
+++ compiler/mercury_to_mercury.m	2000/10/31 02:10:59
@@ -2966,6 +2966,7 @@
 mercury_unary_prefix_op("include_module").
 mercury_unary_prefix_op("impure").
 mercury_unary_prefix_op("insert").
+mercury_unary_prefix_op("instance").
 mercury_unary_prefix_op("inst").
 mercury_unary_prefix_op("lib").
 mercury_unary_prefix_op("listing").
@@ -2984,6 +2985,7 @@
 mercury_unary_prefix_op("sorted").
 mercury_unary_prefix_op("spy").
 mercury_unary_prefix_op("type").
+mercury_unary_prefix_op("typeclass").
 mercury_unary_prefix_op("update").
 mercury_unary_prefix_op("useIf").
 mercury_unary_prefix_op("wait").

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "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-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list