[m-dev.] .opt files and contexts

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jan 23 23:22:42 AEDT 2001


On 23-Jan-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> Is there a reason why there are no real contexts in .opt and .trans_opt
> files?  
> 
> E.g.
> 
> 	:- pragma source_file("foo.m").
> 	#42
> 	< some item from line 42 of the foo.m file >
> 
> Is this just an oversight, or is it a deliberate design decision?

I think `.opt' files predate `:- pragma source_file' and `#<LINE>'
directives.  AFAIK this has not been considered before.

In general I think errors in .opt and .trans_opt files should be rare,
since most errors should be detected before producing those files.
And including `:- pragma source_file' and `#<LINE>' directives
may increase the time it takes to produce and parse those files.
Getting the contexts right in all cases may be difficult.
It may perhaps be worthwhile nonetheless, but given the potential
drawbacks I would rate that one as a very low priority.

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