[m-dev.] for review: rename the lexer and parser modules

Tyson Dowd trd at cs.mu.OZ.AU
Wed Aug 23 13:02:32 AEST 2000


On 23-Aug-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 22-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > The other downside is that this change would break backwards
> > compatibility.  The "lexer" and "parser" modules are publically
> > accessible parts of the interface to the Mercury standard library,
> > documented in the library reference manual.
> 
> You are right. However, I thought of a way to avoid this problem.
> I can leave a lexer.m and parser.m in place, but make all their
> interface predicates call the corresponding predicates in mer_lexer
> and mer_parser, and make the types they define be just equivalences
> of the types defined in mer_lexer and mer_parser.
> 
> This way, people who import modules lexer or parser expecting the
> old modules will get them, but since the rest of the Mercury library
> will not refer to the lexer and parser modules, they will not be linked
> into programs that have their own lexer or parser modules. I *think*
> this works even with shared objects, although I am not sure, and I don't
> know about DLLs at all.

Pete might know the DLL story.

Another alternative is to implement something like :- pragma obsolete or
:- pragma rename for modules.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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