[m-rev.] Add `.' as a module separator.

Ralph Becket rafe at cs.mu.OZ.AU
Tue Dec 3 18:15:40 AEDT 2002


Simon Taylor, Tuesday,  3 December 2002:
> On 03-Dec-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> 
> You should also change the code to write module qualified terms.
> Grep for "\":\"" in the compiler source.

I'm working on this as a separate change.

> > diff -u -r1.109 type_util.m
> > --- compiler/type_util.m	1 Nov 2002 07:06:59 -0000	1.109
> > +++ compiler/type_util.m	2 Dec 2002 03:42:37 -0000
> > @@ -655,10 +655,13 @@
> >  	% include arguments with these types.
> >  
> >  type_util__is_dummy_argument_type(Type) :-
> > -	Type = term__functor(term__atom(":"), [
> > +	Type = term__functor(term__atom(FunctorName), [
> >  			term__functor(term__atom(ModuleName), [], _),
> >  			term__functor(term__atom(TypeName), TypeArgs, _)
> >  		], _),
> > +	(	FunctorName = "."
> > +	;	FunctorName = ":"
> > +	),
> >  	list__length(TypeArgs, TypeArity),
> >  	type_util__is_dummy_argument_type_2(ModuleName, TypeName, TypeArity).
> 
> This should use type_to_ctor_and_args rather than explicitly
> deconstructing the type itself.

Ditto.

> > +ops__op_table(".", after, yfx, 600).		% traditional Prolog (not ISO)
> 
> You should change the comment to mention that the associativity is
> different to ISO Prolog.

I've changed the comment to `% not traditional or ISO Prolog'.

- 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